mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-03-18 02:05:11 +00:00
Add node_modules and src directories to Stylus paths. Third party CSS files can now be imported with absolute path
This commit is contained in:
@@ -43,7 +43,7 @@ Minification, uglification and other tasks you're expected to run before deployi
|
||||
#### Dependencies
|
||||
All dependencies are meant to be installed with **npm**.
|
||||
* JavaScript-files from **node_modules** can be *require()*'d in client-side modules.
|
||||
* CSS files can be [imported](https://learnboost.github.io/stylus/docs/import.html) from **node_modules** using relative path from the stylus file to the css file e.g `@import '../../node_modules/bootstrap/dist/css/bootstrap.css'`
|
||||
* Third party CSS files should be [imported](https://learnboost.github.io/stylus/docs/import.html). Stylus has been configured to use **node_modules** as one of the base directories so you can import file like this: `@import 'bootstrap/dist/css/bootstrap.css'`
|
||||
* You can either create a new gulp task for copying other assets from directories mentioned above or use an array as a value for [assets sources](https://github.com/leonidas/gulp-project-template/blob/master/gulpfile.js#L38) e.g `source: ['./src/assets/**/*.*', 'node_modules/bootstrap/fonts*/*.*']` *(notice the asterisk after 'fonts'? It makes gulp copy the whole directory instead of just the files inside of it)*
|
||||
|
||||
## Suggested development tools
|
||||
|
||||
Reference in New Issue
Block a user