In rails,
js files are located under
app/assets/javascripts
Similarly where to add js and css files in ember-cli app ?
app/styles/ should contain your stylesheets:
Contains your stylesheets, whether SASS, LESS, Stylus, Compass, or plain CSS
(though only one type is allowed, see Asset Compilation).
These are all compiled into <app-name>.css
If you need external JavaScript libraries, you should manage them in dependency sections of package.json and bower.json. You may have to include the assets manually in the build. This could be done by app.import() in ember-cli-build.js or by using ember-auto-import. Have a look in the User Guide for more details.
User Guide also contains a section about folder layout in ember-cli.
Related
Firstly I am new to using foundation.
When you go onto foundations website and you download the complete foundation file you get this index file:
that has link references to the stylesheets and the Js files and if you start coding everything works just fine, but if I create a foundation project through php storm it downloads the foundation release straight from GitHub, but this folder:
does not have a index file that includes the required css and js files, and I have tried to find the files but they are not included in this version from github. What files do I need to link to get foundation working.
In short, you'd need to link foundation.min.css and foundation.min.js. also, make sure you include jquery before the js.
I suggest downloading a bundle from Zurb's site in this link and recieve a good and working bundle.
Foundation is a great framework so don't give up, it's totally worth it.
I am developing an addon in ember.js for my new ember app.
I am trying to figure out how to use sass as styles with my addon and make it independent from my app.
Saying that addon uses sass but the app using it dones't necessary has to have ember-cli-sass in its packages.json.
I've tried almost every solution that there is to be found on google, co I come here for the help :)
Lets say my addon name is awesome-tables, so if I put a css file in awesome-tables/addon/styles/addon.css the styles are concatenated into vendor.css as expected, but it doesn't work for sass / scss
For addons you should add #import intro your app.scss like next ( both from addons )
#import 'ember-freestyle';
#import "pod-styles";
such instructions usually described in README.md for repo. If it's your repo - check next code https://github.com/ebryn/ember-component-css/blob/ae18f897d5b40ef1b3346d8857f6a1136d1b7b4b/lib/include-all.js#L56 as example ( https://github.com/ebryn/ember-component-css/ work with css/less/sass )
P.S. check naming for addon styles
https://github.com/aexmachina/ember-cli-sass
Addon Development
If you want to use ember-cli-sass in an addon and you want to
distribute the compiled CSS it must be installed as a dependency so
that addon/styles/addon.scss is compiled into dist/assets/vendor.css.
P.P.S SASS with Ember CLI addons
Every time I download a project from github I run npm install, which triggers a reindex on the to-be-created node_modules folder. This indexing slows my computer way down. An ugly workaround is to create an empty node_modules folder, exclude it, then run npm install. How can i disable indexing for the node_modules folder in EVERY project by default? Webstorm does this for Meteor projects with .meteor/local, so I assume it's possible.
We usually suggest excluding this folder if it's used for auxiliary purposes (running grunt/gulp/karma, etc.). But we can't exclude it by default, as users developing Node.js applications usually need to have completion/types resolving working for node_modules.
If you need it being excluded from all your projects by default, just add node_modules to 'Ignore files and folders' list in Settings/Editor/File types
Update: since 2016.x, node_modules are auto-excluded by default. Direct dependencies listed in package.json are set up as a JavaScript Library for completion
webstorm treats node_module directory as library root, so there is no mark directory as menu when right click on it. we can change it to a plain directory by delete a config item whose type is project from preference > Language & Framework > Javascript > Libraries, then mark the node_module directory as excluded.
I'd like to know how I can use SASS within an Ember-CLI addon?
I have my styles in /app/styles folder, but I'm not sure that's the right location to have them. I have broccoli-sass installed in my addon project, my Dummy test website compiles properly the scss files when I include my folder in /tests/dummy/app/styles/app.scss.
#import 'app/styles/app.scss';
But I don't know how I can compile the scss files to go into the /dist/assets/vendors.css, which is the file loaded by projects using this addon.
OK I just found out the solution
The style folder needs to be in /addon/styles instead of /app/styles, and the root file should be called addon.scss
I cloned a basic project. I was wondering which files do i have to copy so it becomes a completely self-contained project? I am referring to the css files, the templates, other apps?
Also, where will these files be located.
It depends on the layout of the Django project, but these are usually the basic files of a project.
settings.py
manage.py
urls.py
By going into urls.py, you will be able to see their their views are coming from, and those files should also be include. From the views, see what they import, and so on and so fourth until you reach the template files.