Skip to content

WebFaker/front-end-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌢 Front-end starter

This starter will help you ( I hope ) to make clean front-end development.

Summary:

  • I - βš™οΈ How it works :
  • II - πŸ‘ Make it work :
    1. Install dependencies :
    2. Install gulp ( in global )
    3. Build and / or watch :
  • III - πŸ“œ Create new scss and js files :
    1. Tree
    2. Way to create new components files :
      • SCSS
      • JS
  • IV - πŸ—„ Dependencies :

I - βš™οΈ How it works :

This starter is used to :

  1. Compile files from a source folder to a public folder
  2. Copy the html and assets files from src folder and paste them to public
  3. Group styles into a main style file, compiling and minifying it
  4. Idem for the scripts files
β”œβ”€β”€ public
β”‚   └── .gitkeep
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ assets
β”‚   β”‚   β”œβ”€β”€ fonts
β”‚   β”‚   └── images
β”‚   β”œβ”€β”€ js
β”‚   β”‚   β”œβ”€β”€ app.js
β”‚   β”‚   └── ui.js
β”‚   β”œβ”€β”€ scss
β”‚   β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”‚   β”œβ”€β”€ _footer.scss
β”‚   β”‚   β”‚   └── _header.scss
β”‚   β”‚   β”œβ”€β”€ global
β”‚   β”‚   β”‚   β”œβ”€β”€ fonts.scss
β”‚   β”‚   β”‚   β”œβ”€β”€ global.scss
β”‚   β”‚   β”‚   β”œβ”€β”€ mixins.scss
β”‚   β”‚   β”‚   β”œβ”€β”€ reset.scss
β”‚   β”‚   β”‚   └── variables.scss
β”‚   β”‚   └── master.scss
β”‚   β”œβ”€β”€ index.html
β”‚   └── test.html
β”œβ”€β”€ .babelrc
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .jshintrc
β”œβ”€β”€ gulpfile.js
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── yarn.lock

II - πŸ‘ Make it work :

1. Install dependencies :

  • use yarn or npm install ( I assume that you have already installed yarn or npm )

Now you have all your dependencies installed.

2. Install gulp ( in global ) :

  • use yarn global add gulp or npm install -g gulp

Now you can run gulp tasks !

3. Build and / or watch :

  • use gulp build to build your work one time ( open public/index.html in your browser after that )
  • or simply gulp to build it in a loop and actualize your modifications ( using BrowserSync πŸ”„ )

Now you have your dev environment ready to work πŸ‘

III - πŸ“œ Create new files :

1. SCSS ( components )

  • Go to src/scss/components
  • Create your file with this structure: _filename.scss
  • Don't forget to import this new file in master.scss like that: @import: 'component/filename'

2. JS ( scripts )

  • Go to src/js
  • Create your file with this structure: filename.js
  • Don't forget to import this new file in app.js like that: import: './filename'

3. HTML

  • Go to src/
  • Create your file
  • Don't forget to copy the style and script link:
<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="css/master.min.css">
</head>
<body>
    <!-- Code goes here -->
    <script src="js/app.min.js" charset="UTF-8"></script>
</body>
</html>

IV - 🏞 Assets

Just put your assets ( images, music, videos, fonts ) in the src/assets folder, and it'll be copied in public.

The url() of backgrounds in SCSS will be updated too πŸ˜‰

V - πŸ—„ Dependencies

package.json

"devDependencies": {
    "babel": "^6.23.0",
    "babel-core": "^6.26.3",
    "babel-preset-es2015": "^6.24.1",
    "browser-sync": "^2.24.6",
    "gulp": "^3.9.1",
    "gulp-babel": "^7.0.1",
    "gulp-cssmin": "^0.2.0",
    "gulp-plumber": "^1.2.0",
    "gulp-rename": "^1.4.0",
    "gulp-resolve-url": "^0.0.2",
    "gulp-sass": "^4.0.1",
    "gulp-sourcemaps": "^2.6.4",
    "gulp-uglify-es": "^1.0.4",
    "jshint": "^2.9.5",
    "webpack-stream": "^4.0.3"
  }
.jshintrc

About

[STARTER] Goal : Make clean front-end development using Gulp 🌢

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors