Comments (10)
This addon will be much appreciated
from r.js.
In the meantime, you can use this approach to do multiple "single file" builds by creating a script in node to drive the build multiple times: https://gist.github.com/1509135
from r.js.
This would be a much welcome addition!
Just as a thought on the current structure of the build config, i had actually tried to achieve the same result using the following (without reading the manual of course!):
modules: [
{
name: 'foo',
include: ['bar']
out: './deploy/baz.js'
}
]
... following the same structure of a "single file" build, but defined within a module element. Just throwing the "out" option as an idea as well as removeCombined.
from r.js.
@bustardcelly that is possible today, just take the name, include and out options and place them at the top level of the build config, not inside modules
, then remove the modules
area. I will be pushing out a doc update this afternoon that makes this clearer.
from r.js.
Yeah I've set something simular up now. To make sure not only the module + dependency files are copied, but also my css etc I'm using an ant build file, could also be done in node.js of course.
from r.js.
@jrburke right. sorry i meant to say that i actually have a list of modules and have tried adding the out option to each.
eg.
modules: [
{
name: 'foo',
include: ['bar']
out: './deploy/baz.js'
},
{
name: 'qux',
include: ['quux'],
out: './deploy/corge.js'
}
]
The single module approach, each declared in its own build config, is what i currently do and have a script to cycle through and invoke r.js for each one - much like the gist posted previously.
from r.js.
+1 It'd very desirable feature. As now with config-based build we have to add some custom build step for cleaning source files.
from r.js.
+1
from r.js.
+1
from r.js.
This is in the dev2.0 branch, and will be in the 2.0 release. If you are comfortable using dev2.0 code you can try it out (make sure you get the latest require.js from its dev2.0 branch too). I would encourage more testing. While I have a couple of unit tests in for it now, the more testing the better.
from r.js.
Related Issues (20)
- How to use requirejs optimizer to create Module specific code chunk instead of big single file for Backbone project? HOT 3
- Wrong relative path for module-create in source map HOT 1
- Java/JSS 10 build error HOT 3
- Cannot use functions for out and onModuleBundleComplete simultaneously
- Any plans for supporting ES2017+ in uglify/minify? HOT 1
- ES6 Object Spread syntax not work HOT 4
- [QUESTION] Where I can find the CI service? HOT 1
- TypeError: Cannot read property 'type' of undefined HOT 4
- r js stops loading dependecies of module when i use specific module name for that file. HOT 1
- Unexpected token ... HOT 12
- preserveLicenseComments should do its best to not add multiple identical licenses from the same project. HOT 2
- This is not an issue and should be removed
- Define Incorrectly Updated When No Dependencies And Function Wrapped In Parentheses
- Bundaling ES class with static field lead to [Error: Line 5: Unexpected token =] HOT 1
- Unable to concatenate all module to single file HOT 1
- Has insecure URLs (ESLint error: no-insecure-url)
- Add a security policy HOT 4
- Can I transpile a commonjs AST from rollup watch with some code from here?
- e.getLayout is not a function after upgrading to requirejs 2.3.6
- Prototype Pollution Vulnerability Affecting [email protected] module HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r.js.