2

When creating a project JavaScript project my standard file layout looks like this:

project-name/
 |- bower_components/
 |- node_modules/
 |- src/
 |- tests/
 |- .csslintrc
 |- .jshintrc
 |- .htmlhintrc
 |- bower.json
 |- Gruntfile.js
 `- package.json

node_modules and bower_components are standard. I've also noticed that src or www are some kind of standard for source files and spec, specs, test or tests are mostly used for tests. dist is really common for putting releasable files.

However, I also often get generated files such as css generated from my less files. Those files belong in the dist folder when releasing, but is there some kind of standard for where to put those files when testing locally on a webserver? tend to use bower_components because it is already hosted on the local webserver, but it doesn't feel right.

Remco Haszing
  • 7,178
  • 4
  • 40
  • 83

1 Answers1

0

3.3. CSS files MUST have the file extension .css and SHOULD be stored in the relevant includes directory in the site structure, usually /style/.

Source: http://www.bbc.co.uk/guidelines/futuremedia/technical/css.shtml

/assets/

and

/resources/

are other common places for css files See for example https://github.com/h5bp/html5-boilerplate/issues/1121

See also the similar question Naming convention for assets (images, css, js)?

All-in-all it is up to you, but make sure it is consistent, and logical.

Community
  • 1
  • 1
Zlatin Zlatev
  • 3,034
  • 1
  • 24
  • 32