This example shows how to use AngularJS modules to load restful configurations prior to main application bootstrap and sharing a resource across initializer and main application.
A Pen by Brandon Wilburn on CodePen.
| var webdriver = require('selenium-webdriver'); | |
| var printPage = function () { | |
| return browser.getPageSource(); | |
| }; | |
| var logPage = function (txt) { | |
| console.log(txt); | |
| }; |
| grunt.registerTask('scripts:exist',function(){ | |
| var filesList = grunt.template.process('<%= build.dist.js.dest %>').split(','); | |
| // console.log(filesList); | |
| var done = this.async(); | |
| var interval; | |
| var validate = function(){ | |
| var missedFiles = []; |
| Publish_Web_Archive() { | |
| localFilePath="$1" | |
| targetFolder="http://artifax:8081/artifactory/internal/$2" | |
| artifactoryUser="arieso" | |
| artifactoryPassword="Network123!" | |
| if [ ! -f "$localFilePath" ]; then | |
| echo "ERROR: local file $localFilePath does not exists!" | |
| exit 1 | |
| fi |
| Read_Artifactory_Properties () { | |
| ARTIFACTORY_PROPERTIES_FILE=./Build/artifax.credentials | |
| if [[ ! -f $ARTIFACTORY_PROPERTIES_FILE ]]; then | |
| echo "Artifactory credentials file could not be found." | |
| exit 1 | |
| fi | |
| while IFS='=' read -r key value; do | |
| [[ -n $key ]] && printf -v ${key//./_} "${value%% }" |
This example shows how to use AngularJS modules to load restful configurations prior to main application bootstrap and sharing a resource across initializer and main application.
A Pen by Brandon Wilburn on CodePen.
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Jasmine Spec Runner</title> | |
| <% css.forEach(function(style){ %> | |
| <link rel="stylesheet" type="text/css" href="<%= style %>"> | |
| <% }) %> |
| tr-tz-mbp-2:guiMbb brandonwilburn$ cat Gruntfile.coffee | |
| module.exports = (grunt) -> | |
| path = require('path') | |
| gruntConfig = | |
| pkg: grunt.file.readJSON('package.json') | |
| exec: | |
| generateAppResourcesJson: |
| techieBrandon$ cat Gruntfile.coffee | |
| module.exports = (grunt) -> | |
| path = require('path') | |
| gruntConfig = | |
| pkg: grunt.file.readJSON('package.json') | |
| exec: | |
| generateAppResourcesJson: |
| techieBrandon$ cat Gruntfile.coffee | |
| module.exports = (grunt) -> | |
| path = require('path') | |
| coffeeFiles = | |
| 'web-app/cs/**/*.coffee': { expand: true, flatten: false, cwd: 'web-app/cs/', src: ['**/*.coffee'], dest: '.grunt/web-app/js/', ext: '.js' } | |
| 'web-app/coffeeConfig/**/*.coffee': { expand: true, flatten: false, cwd: 'web-app/coffeeConfig/', src: ['**/*.coffee'], dest: '.grunt/web-app/coffeeConfig/', ext: '.js' } | |
| 'spec/cs/**/*.coffee': { expand: true, flatten: false, cwd: 'spec/cs/', src: ['**/*.coffee'], dest: '.grunt/spec/js/', ext: '.js' } |
| def pull = ctx.getBean('grailsResourceProcessor') | |
| def userDir = System.properties['user.home'] | |
| def outFile = new File("${userDir}/resource.out") | |
| outFile.withPrintWriter { wr-> | |
| wr.print(pull.dumpResources()) | |
| } |