Comments (5)
It looks like you just have to change the dest
option in your development
targetment to point at appDir
instead of tmpDir
.
tmpDir
is used for production only, because the concatenated files are moved to a temporary directory first, before minification/uglification. However, in the development target, we leave them un-minified so it's more readable.
You can see on https://github.com/calvinl/ng-phonegap/blob/development/Gruntfile.js#190 line 190 that the development target is pointed directly at appDir
.
Let me know if that works for you!
from ng-phonegap.
p.s. Not necessary, but i would recommend adding your sass target separately from the LESS target, rather than replacing it -- that way you can easily switch back and forth when you want/need to.
from ng-phonegap.
Yeah, I tried that actually. When I make a change to an scss file after pointing the dest option to appDir, I still get no compiled CSS file. Wondering if the clean is wiping it out?
>> File "src/scss/main.scss" changed.
Running "clean:css" (clean) task
Cleaning "www/css"...OK
from ng-phonegap.
Your sass task is misconfigured then. Try something like this:
// compile SASS files into CSS and store them in temp directories
sass: {
production: {
files: [
{
src: ['<%= srcDir %>/**/*.scss', '<%= srcDir %>/!**/_*.scss'],
cwd: 'scss',
dest: '<%= tmpDir %>/css/app.css',
ext: '.css',
expand: true
}
],
options: {
style: 'expanded',
compass: true
}
},
development: {
files: {
// put app.css directly into the build directory for development
"<%= appDir %>/css/app.css": [
"<%= srcDir %>/css/**/*.scss"
]
},
options: {
style: 'expanded',
compass: true
}
}
},
Notice the the different style -- you can get more specific using the style you were using, but at least now you know it's just a misconfiguration. I'd suggest reading the docs for grunt-contrib-sass
to get a handle on how it works.
You'll also need to install grunt-contrib-compass since you have compass: true
in your options.
from ng-phonegap.
Ah, the problem was the cwd
property. It was causing the path to be set relative to a path that didn't exist. This fixed the problem:
development: {
options: {
style: 'expanded',
compass: true
},
files: [
{
expand: true,
src: ['**/*.scss', '!**/_*.scss'],
cwd: '<%= srcDir %>/scss',
dest: '<%= appDir %>/css',
ext: '.css'
}
]
}
Thanks for the help Calvin!
from ng-phonegap.
Related Issues (13)
- missing command in the README file HOT 1
- checkout ionic framework HOT 1
- ngTouch problem
- phonegap run ios show different result than server HOT 2
- Documentation missing steps HOT 6
- Grunt Not copying src HOT 3
- hardcoded appDir HOT 1
- .bowerrc and .gitignore files not cloned with git clone
- navigate question HOT 3
- Is there a reason why html2js is not used? HOT 6
- phonegap.js is missing HOT 3
- grunt dev boots to port 9001 HOT 2
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 ng-phonegap.