I am trying to build my project with r.js requirejs plugin but I am not able to get generated output file. compiling successfully.
build.js
({
baseUrl: ".",
paths : {
plugins : "lib",
underscore : "lib/underscore-min",
backbone : "lib/backbone-min",
text : "lib/text",
},
mainConfigFile:"app",
name: "app",
out: "akorp-built.js"
})
Directory structure
project
|
|--js
| |--lib
| |--modules
| |--app.js
| |--require-jquery.js
| |--build.js
|
|--css
r.js
Command
node r.js -o project/js/build.js
compiling but not generating output file.
I tried this, I wonder compiled without 'build.js' file in directory
node r.js -o build.js
Is anything wrong on my side?
Move r.js to the same directory as build.js. Then make sure current directory in the command line is set to that directory. If it's on windows, just call:
cd /d %~dp0
node r.js -o build.js
PAUSE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With