-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New plan is to attempt to make a single browserify bundle of JS + Coffee and app + vendor. Thoughts: * We'd remove concat_sourcemap if we could, but other plugins will want to use it (conflicts) and we also want our global JST/templates to come along. * concat_sourcemap chokes on the sourcemaps from browserify, which are provided as Data URIs. Can it be changed on either side to fix this? #7 * How do we provide multiple basepaths so vendor stuff can be loaded?
- Loading branch information
Showing
5 changed files
with
48 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
module.exports = (lineman) -> | ||
app = lineman.config.application | ||
|
||
config: | ||
loadNpmTasks: lineman.config.application.loadNpmTasks.concat("grunt-browserify") | ||
loadNpmTasks: app.loadNpmTasks.concat("grunt-browserify") | ||
|
||
prependTasks: | ||
common: ["browserify"].concat(lineman.config.application.prependTasks.common) | ||
common: ["browserify"].concat(app.prependTasks.common) | ||
|
||
browserify: | ||
app_js: | ||
files: | ||
"generated/js/browserifyBundle.js" : "<%= files.js.browserifyBundle %>" | ||
options: | ||
debug: true | ||
|
||
app_coffee: | ||
common: | ||
files: | ||
"generated/js/browserifyBundle.coffee.js" : "<%= files.coffee.browserifyBundle %>" | ||
"<%= files.browserify.generated %>" : "<%= files.browserify.entrypoint %>" | ||
options: | ||
debug: true | ||
debug: false | ||
extensions: [".js", ".coffee"] | ||
transform: ["coffeeify"] | ||
|
||
watch: | ||
browserify: | ||
files: ["<%= files.js.vendor %>", "<%= files.js.app %>", "<%= files.coffee.app %>"] | ||
tasks: ["browserify", "concat_sourcemap:js"] | ||
|
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = (lineman) -> | ||
app = lineman.config.application | ||
|
||
config: | ||
removeTasks: | ||
common: app.removeTasks.common.concat("coffee") | ||
|
||
watch: | ||
coffee: | ||
files: [] | ||
tasks: [] |
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,10 +1,17 @@ | ||
_ = require("underscore") | ||
|
||
module.exports = (lineman) -> | ||
app = lineman.config.application | ||
|
||
config: | ||
concat_sourcemap: | ||
js: | ||
src: [ | ||
"<%= files.js.vendor %>" | ||
"<%= files.js.browserifyBundle %>" | ||
"<%= files.coffee.browserifyBundle %>" | ||
"<%= files.template.generated %>" | ||
] | ||
src: _(app.concat_sourcemap.js.src).without( | ||
"<%= files.js.vendor %>", "<%= files.js.app %>", "<%= files.coffee.generated %>" | ||
).concat("<%= files.browserify.generated %>") | ||
|
||
|
||
watch: | ||
js: | ||
files: [] | ||
tasks: [] |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = (lineman) -> | ||
files: | ||
browserify: | ||
generated: "generated/js/browserify.js" | ||
entrypoint: "app/js/entrypoint.{js,coffee}" |
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