This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
Multiple files to compile #210
Comments
Explain but the compilation create problems. |
I've made some change and now my project compile what i want. useminPrepare: {
html: ['<%= yeoman.app %>/index.html','<%= yeoman.app %>/mobile.html',],
options: {
dest: '<%= yeoman.dist %>'
},
}, After that, i change the require task because he was compiling everything in main.js 👎 So I've change the require task like that : var requirejsOptions = {};
requirejsOptions['desktop'] = {
"options": {
baseUrl: '<%= yeoman.app %>/scripts',
optimize: 'none',
name: 'main',
paths: {
'templates': '../../.tmp/scripts/templates',
'jquery': '../../app/bower_components/jquery/jquery',
'underscore': '../../app/bower_components/underscore/underscore',
'backbone': '../../app/bower_components/backbone/backbone',
'snap': '../../app/bower_components/Snap.svg/dist/snap.svg-min',
'TweenMax': '../../app/bower_components/greensock-js/src/uncompressed/TweenMax',
},
preserveLicenseComments: false,
useStrict: true,
wrap: true,
out: '<%= yeoman.dist %>/scripts/main.js'
}
};
requirejsOptions['mobile'] = {
"options": {
baseUrl: '<%= yeoman.app %>/scripts',
optimize: 'none',
name: 'mobile',
paths: {
'templates': '../../.tmp/scripts/templates',
'jquery': '../../app/bower_components/jquery/jquery',
'underscore': '../../app/bower_components/underscore/underscore',
'backbone': '../../app/bower_components/backbone/backbone',
'snap': '../../app/bower_components/Snap.svg/dist/snap.svg-min',
'TweenMax': '../../app/bower_components/greensock-js/src/uncompressed/TweenMax',
},
preserveLicenseComments: false,
useStrict: true,
wrap: true,
out: '<%= yeoman.dist %>/scripts/mobile.js',
}
}; and the requirejs task function : requirejs: requirejsOptions, If it can help ;) It works fine, but it imports all my templates jst in each js (main.js & mobile.js)
I've change all the configuration but when i build require import in my classes causes errors (he can't find desktop in the .tmp folder etc), not when i use serve... strange |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, In my project (a NodeJS phone Controller ==> desktop) i need to deal with two mains html files.
index.html => desktop render
mobile.html => mobile render
Everything works fine in the app folder, but the compilation create problems.
Here is my folder structure (just the interresting things)
index.html:
mobile.html:
Actually i don't know what to change in ma grunt configartion file :
I pass the different test that i made, they went all wrong...
So if you know how to configure the grunt file for my structure, Thanks ;)
The text was updated successfully, but these errors were encountered: