-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modded gruntfile to process baw.configuration.tpl.js
Added options to grunt file that allow automatic rewriting of configuration files and path references for different environements. Fixed a few bugs with the previous link on the listen page.
- Loading branch information
Showing
6 changed files
with
199 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,109 @@ | ||
var appConfigFile = 'src/baw.configuration.tpl.js'; | ||
|
||
/** | ||
* This file/module contains all configuration for the build process. | ||
*/ | ||
module.exports = { | ||
/** | ||
* The `build_dir` folder is where our projects are compiled during | ||
* development and the `compile_dir` folder is where our app resides once it's | ||
* completely built. | ||
*/ | ||
build_dir: 'build', | ||
compile_dir: 'bin', | ||
/** | ||
* The `build_dir` folder is where our projects are compiled during | ||
* development and the `compile_dir` folder is where our app resides once it's | ||
* completely built. | ||
*/ | ||
build_dir: 'build', | ||
compile_dir: 'bin', | ||
|
||
build_configs: { | ||
configFile: appConfigFile, | ||
development: { | ||
apiRoot: "http://staging.ecosounds.org", | ||
siteRoot: "localhost:8080", | ||
siteDir: "/" | ||
}, | ||
staging: { | ||
apiRoot: "http://staging.ecosounds.org", | ||
siteRoot: "http://staging.ecosounds.org/system/listen_to", | ||
siteDir: "/system/listen_to/" | ||
}, | ||
production: { | ||
apiRoot: "http://ecosounds.org", | ||
siteRoot: "http://ecosounds.org/????", | ||
siteDir: "????" | ||
} | ||
}, | ||
|
||
/** | ||
* This is a collection of file patterns that refer to our app code (the | ||
* stuff in `src/`). These file paths are used in the configuration of | ||
* build tasks. `js` is all project javascript, less tests. `ctpl` contains | ||
* our reusable components' (`src/common`) template HTML files, while | ||
* `atpl` contains the same, but for our app's code. `html` is just our | ||
* main HTML file, `less` is our main stylesheet, and `unit` contains our | ||
* app's unit tests. | ||
*/ | ||
app_files: { | ||
js: [ 'src/**/*.js', '!src/**/*.spec.js', '!src/assets/**/*.js' ], | ||
jsunit: [ 'src/**/*.spec.js' ], | ||
|
||
/** | ||
* This is a collection of file patterns that refer to our app code (the | ||
* stuff in `src/`). These file paths are used in the configuration of | ||
* build tasks. `js` is all project javascript, less tests. `ctpl` contains | ||
* our reusable components' (`src/common`) template HTML files, while | ||
* `atpl` contains the same, but for our app's code. `html` is just our | ||
* main HTML file, `less` is our main stylesheet, and `unit` contains our | ||
* app's unit tests. | ||
*/ | ||
app_files: { | ||
js: [ 'src/**/*.js', '!src/**/*.spec.js', '!src/assets/**/*.js' ], | ||
jsunit: [ 'src/**/*.spec.js' ], | ||
|
||
coffee: [ 'src/**/*.coffee', '!src/**/*.spec.coffee' ], | ||
coffeeunit: [ 'src/**/*.spec.coffee' ], | ||
coffee: [ 'src/**/*.coffee', '!src/**/*.spec.coffee' ], | ||
coffeeunit: [ 'src/**/*.spec.coffee' ], | ||
|
||
atpl: [ 'src/app/**/*.tpl.html' ], | ||
ctpl: [ 'src/common/**/*.tpl.html' ], | ||
atpl: [ 'src/app/**/*.tpl.html' ], | ||
ctpl: [ 'src/common/**/*.tpl.html' ], | ||
|
||
html: [ 'src/index.html'], | ||
sass: [ 'src/sass/application.scss' ] | ||
//less: 'src/less/main.less' | ||
}, | ||
html: [ 'src/index.html'], | ||
sass: [ 'src/sass/application.scss' ] | ||
//less: 'src/less/main.less' | ||
}, | ||
|
||
/** | ||
* This is a collection of files used during testing only. | ||
*/ | ||
test_files: { | ||
js: [ | ||
'vendor/angular-mocks/angular-mocks.js' | ||
] | ||
}, | ||
/** | ||
* This is a collection of files used during testing only. | ||
*/ | ||
test_files: { | ||
js: [ | ||
'vendor/angular-mocks/angular-mocks.js' | ||
] | ||
}, | ||
|
||
/** | ||
* This is the same as `app_files`, except it contains patterns that | ||
* reference vendor code (`vendor/`) that we need to place into the build | ||
* process somewhere. While the `app_files` property ensures all | ||
* standardized files are collected for compilation, it is the user's job | ||
* to ensure non-standardized (i.e. vendor-related) files are handled | ||
* appropriately in `vendor_files.js`. | ||
* | ||
* The `vendor_files.js` property holds files to be automatically | ||
* concatenated and minified with our project source files. | ||
* | ||
* The `vendor_files.css` property holds any CSS files to be automatically | ||
* included in our app. | ||
* | ||
* The `vendor_files.assets` property holds any assets to be copied along | ||
* with our app's assets. This structure is flattened, so it is not | ||
* recommended that you use wildcards. | ||
*/ | ||
vendor_files: { | ||
js: [ | ||
'vendor/jquery/jquery.js', | ||
// TODO: THIS IS TERRIBLE! REMOVE UI ASAP... OR AT LEAST ONLY INCLUDE RELEVANT COMPONENTS | ||
'vendor/jquery-ui/ui/jquery-ui.js', | ||
'vendor/momentjs/moment.js', | ||
'vendor/angular/angular.js', | ||
'vendor/angular-route/angular-route.js', | ||
'vendor/angular-resource/angular-resource.js', | ||
'vendor/angular-bootstrap/ui-bootstrap-tpls.min.js', | ||
'vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js', | ||
'vendor/angular-ui-router/release/angular-ui-router.js', | ||
'vendor/angular-ui-utils/modules/route/route.js', | ||
// TODO: the following line is dodgy and bloats the app | ||
'vendor/angular-ui-utils/modules/**/*.js', '!vendor/angular-ui-utils/modules/**/*Spec.js', | ||
'vendor/modernizr/modernizr.js', | ||
'vendor/underscore/underscore.js' | ||
], | ||
css: [ | ||
'vendor/hint.css/hint.css' | ||
], | ||
assets: [ | ||
] | ||
} | ||
/** | ||
* This is the same as `app_files`, except it contains patterns that | ||
* reference vendor code (`vendor/`) that we need to place into the build | ||
* process somewhere. While the `app_files` property ensures all | ||
* standardized files are collected for compilation, it is the user's job | ||
* to ensure non-standardized (i.e. vendor-related) files are handled | ||
* appropriately in `vendor_files.js`. | ||
* | ||
* The `vendor_files.js` property holds files to be automatically | ||
* concatenated and minified with our project source files. | ||
* | ||
* The `vendor_files.css` property holds any CSS files to be automatically | ||
* included in our app. | ||
* | ||
* The `vendor_files.assets` property holds any assets to be copied along | ||
* with our app's assets. This structure is flattened, so it is not | ||
* recommended that you use wildcards. | ||
*/ | ||
vendor_files: { | ||
js: [ | ||
'vendor/jquery/jquery.js', | ||
// TODO: THIS IS TERRIBLE! REMOVE UI ASAP... OR AT LEAST ONLY INCLUDE RELEVANT COMPONENTS | ||
'vendor/jquery-ui/ui/jquery-ui.js', | ||
'vendor/momentjs/moment.js', | ||
'vendor/angular/angular.js', | ||
'vendor/angular-route/angular-route.js', | ||
'vendor/angular-resource/angular-resource.js', | ||
'vendor/angular-bootstrap/ui-bootstrap-tpls.min.js', | ||
'vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js', | ||
'vendor/angular-ui-router/release/angular-ui-router.js', | ||
'vendor/angular-ui-utils/modules/route/route.js', | ||
// TODO: the following line is dodgy and bloats the app | ||
'vendor/angular-ui-utils/modules/**/*.js', '!vendor/angular-ui-utils/modules/**/*Spec.js', | ||
'vendor/modernizr/modernizr.js', | ||
'vendor/underscore/underscore.js' | ||
], | ||
css: [ | ||
'vendor/hint.css/hint.css' | ||
], | ||
assets: [ | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.