https://github.com/hudochenkov/new-project
Starting setup for a new project
https://github.com/hudochenkov/new-project
Last synced: 6 months ago
JSON representation
Starting setup for a new project
- Host: GitHub
- URL: https://github.com/hudochenkov/new-project
- Owner: hudochenkov
- Archived: true
- Created: 2014-04-18T13:31:55.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-04-09T08:57:57.000Z (about 7 years ago)
- Last Synced: 2025-02-19T13:47:19.188Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 164 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to work
All files for production are compiled with [Gulp]. CSS compiled with [PostCSS]. JavaScript libs and plugins are concatenated to the single file. Images are optimized. HTML just copied.
## Setup
1. Install [Node.js].
2. Install development modules:
$ npm install
## Folders structure
`root` — configs and dependencies.
`build` — destination directory. There would be generated assets. Shouldn't be in repository.
`dev` — source directory for everything:
* dev root — HTML.
* `img` — images.
* `img/temp` — temporary images. They don't go to production and for demonstration purpose only.
* `js` — JavaScript.
* `js/libs` — JavaScript libraries and plugins, that can't be installed via npm.
* `pcss` — PostCSS files.
## Generate assets
Start watching service which generates _dev_ version on each source file change, also this start local webserver with autoreload:
$ npm start
Generate _production_ (minified and optimized) version:
$ npm run build
## Other Gulp-tasks
**npm run lint** — check code style in stylesheets and JavaScipt files.
**npm run deploy** — upload files to the server.
[Gulp]: https://github.com/gulpjs/gulp/
[PostCSS]: https://github.com/postcss/postcss/
[Node.js]: https://nodejs.org/