forked from FuelFrontend/generator-smacss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React app folder structure for issue FuelFrontend#50
- Loading branch information
1 parent
295bde7
commit 82c1231
Showing
5 changed files
with
300 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# <%= site_name %> | ||
|
||
**Project Setup** | ||
|
||
## Installation | ||
|
||
*You need to have [NodeJS](http://nodejs.org/)* | ||
|
||
*Type below commands in terminal* | ||
|
||
``````` | ||
npm install -g yo | ||
npm install -g gulp | ||
npm install -g bower | ||
``````` | ||
|
||
### Install [smacss generator](https://github.com/FuelFrontend/generator-smacss) | ||
|
||
*Type below commands in terminal* | ||
|
||
``````` | ||
npm install -g generator-smacss | ||
``````` | ||
|
||
**Clone the repo & cd into it** | ||
|
||
|
||
``````` | ||
sudo npm install | ||
bower install | ||
``````` | ||
|
||
**Finally** | ||
|
||
*Type below command in terminal* | ||
|
||
``````` | ||
gulp | ||
``````` | ||
|
||
**Application Directory Structure** | ||
|
||
|
||
```````` | ||
├── app | ||
│ ├── bower_components | ||
│ ├── images | ||
│ ├── js | ||
│ │ └── lib | ||
│ │ │ └── third-party-files.js | ||
│ │ └── controllers | ||
│ │ └── directives | ||
│ │ └── services | ||
│ │ └── filters | ||
│ │ └── application.js | ||
│ ├── css | ||
│ │ └── master.css | ||
│ ├── partials | ||
│ │ └── header.html | ||
│ │ └── footer.html | ||
│ ├── scss | ||
│ │ └── modules | ||
│ │ │ └── module-name.scss | ||
│ │ └── pages | ||
│ │ │ └── page-landing.scss | ||
│ │ └── base.scss | ||
│ │ └── layout.css | ||
│ │ └── mixins.css | ||
│ │ └── reset.css | ||
│ │ └── variables.css | ||
│ └── index.html | ||
├── build | ||
│ └── build-files | ||
├── zip | ||
│ └── compressed-files | ||
├── node_modules | ||
├── package.json | ||
├── gulpfile.js | ||
├── bower.json | ||
├── .bowerrc | ||
├── .gitattributes | ||
└── .gitignore | ||
```````` | ||
|
||
**Quick Commands** | ||
|
||
|
||
* **Clean** _Remove all files from your build folder_ | ||
|
||
``````` | ||
gulp clean | ||
``````` | ||
|
||
* **Zip** _Compress you app & save in `zip` folder with timestamp for quick sharing_ | ||
|
||
``````` | ||
gulp zip | ||
``````` | ||
|
||
* **Controller** _Creates a controller in `app/js/controllers`_ | ||
|
||
``````` | ||
yo smacss:controller <name> | ||
``````` | ||
|
||
* **Service** _Creates a service in `app/js/services`_ | ||
|
||
``````` | ||
yo smacss:service <name> | ||
``````` | ||
|
||
* **Directive** _Creates a directive in `app/js/directives`_ | ||
|
||
``````` | ||
yo smacss:directive <name> | ||
``````` | ||
|
||
* **Filter** _Creates a filter in `app/js/filters`_ | ||
|
||
``````` | ||
yo smacss:filter <name> | ||
``````` | ||
|
||
# Environment | ||
|
||
Generator Smacss comes with development and producution modes. In default it runs in development mode. | ||
|
||
You can switch to production mode using the following command | ||
|
||
``````` | ||
gulp prod | ||
``````` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "<%= appName %>", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"angular": "1.2.6"<% if (includeResourceModule) { %>, | ||
"angular-resource": "1.2.6"<% } if (includeSanitizeModule) { %>, | ||
"angular-sanitize": "1.2.6"<% } if (includeRouteModule) { %>, | ||
"angular-route": "1.2.6"<% } if (includeAnimateModule) { %>, | ||
"angular-animate": "1.2.6"<% } if (includeQuery) { %>, | ||
"jquery": "*"<% } if (includeModernizr) { %>, | ||
"modernizr": "*" <% } %> | ||
}, | ||
"devDependencies": { | ||
|
||
}, | ||
"overrides": { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE HTML> | ||
<html ng-app="<%= site_name %>"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title><%= site_name %></title> | ||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"> | ||
|
||
<!-- CSS files --> | ||
<link rel="stylesheet" href="css/master.css"> | ||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'> | ||
</head> | ||
<body> | ||
<!-- TODO: Remove gulp partials, as angular supports partials in default --> | ||
@@include('./partials/_header.html') | ||
|
||
<!-- Section --> | ||
<section> | ||
<p style="font-size: 22px;">Sample angular page, Your good name please?</p> | ||
<p> | ||
<input type="text" ng-model="name" style="background: #fff; border: none; padding: 10px 15px;" /> | ||
<span ng-hide="!name" style="font-size: 14px; margin: 30px 0 0 20px;">Welcome {{ name }}, You look great today!</span> | ||
</p> | ||
</section> | ||
|
||
@@include('./partials/_footer.html') | ||
|
||
<!-- JS files --> | ||
<script src="js/bower.js" type="text/javascript" charset="utf-8"></script> | ||
<script src="js/application.js" type="text/javascript" charset="utf-8"></script> | ||
<!-- endbuild --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"name": "<%= site_name %>", | ||
"version": "0.0.1", | ||
"description": "Application description goes here", | ||
"licenses": "enter your license type here", | ||
"repository": "your repository url goes here", | ||
"devDependencies": { | ||
"gulp": "~3.9.0", | ||
"gulp-if": "~1.2.5", | ||
"gulp-sass": "~2.1.1", | ||
"gulp-concat": "~2.4.3", | ||
"gulp-file-include": "~0.8.0", | ||
"gulp-autoprefixer": "^2.3.1", | ||
"gulp-load-plugins": "~0.8.0", | ||
"gulp-changed": "^0.4.1", | ||
"gulp-filter": "^1.0.0", | ||
"gulp-ignore": "^1.2.0", | ||
"gulp-imagemin": "^0.6.2", | ||
"gulp-jshint": "^1.8.4", | ||
"gulp-minify-html": "^0.1.4", | ||
"gulp-minify-css": "^0.3.7", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-size": "^1.0.0", | ||
"gulp-task-listing": "*", | ||
"gulp-uglify": "^0.3.1", | ||
"gulp-zip": "^0.3.4", | ||
"gulp-webserver": "^0.6.0", | ||
"gulp-filter": "^2.0.2", | ||
"gulp-sourcemaps": "^1.5.0", | ||
"del": "~1.1.1", | ||
"open": "~0.0.5", | ||
"chalk": "~0.5.1", | ||
"main-bower-files": "~2.5.0", | ||
"browser-sync": "~1.9.1", | ||
"run-sequence": "~1.0.2", | ||
"jshint-stylish": "~1.0.0", | ||
"bower": "~1.4.1", | ||
"underscore": "~1.8.3", | ||
"underscore.string": "3.0.3", | ||
"require-dir": "0.3.0", | ||
"portscanner": "^1.0.0", | ||
"react": "~0.10.0", | ||
"react-router-component" : "~0.18.3", | ||
"reactify": "~0.13.1", | ||
"babel-core": "^6.3.15", | ||
"babel-eslint": "^4.1.6", | ||
"babel-loader": "^6.2.0", | ||
"babel-plugin-react-transform": "^2.0.0-beta1", | ||
"babel-plugin-transform-object-rest-spread": "^6.3.13", | ||
"babel-plugin-transform-runtime": "^6.3.13", | ||
"babel-polyfill": "^6.3.14", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-react": "^6.3.13", | ||
"babel-runtime": "^6.3.13", | ||
"react-hot-loader": "^1.3.0", | ||
"react-transform-hmr": "^1.0.1", | ||
"redux-devtools": "^3.0.1", | ||
"redux": "^3.0.5", | ||
"redux-logger": "^2.3.1", | ||
"redux-thunk": "^1.0.3", | ||
"es6-promise": "^3.0.2" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
} | ||
} |