daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Mar 24th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1.Create a github repo(It using github for free, then create a public repo).
  2. 2.Create a "gh-pages" branch
  3. 3.Clone it on local machine.
  4. 4.checkout to gh-pages branch
  5. 5.`npm init -y` in that local repo
  6. 6.`npm install --save-dev parcel-bundler` install parcel as dev dependency.
  7. 7. Add .html, .css and .js files.
  8. 8. Lets add npm script for bundling with parcel js.
  9. 9. `"start": "parcel src/index.html"`
  10. Now we want to push code in github pages
  11. 10.`npm install --save-dev gh-pages` install gh-pages as dev dependency.
  12. 11. add below scripts -
  13.   `"build": "parcel build src/index.html",
  14.    "predeploy": "rm -rf dist && parcel build src/index.html --no-source-maps --public-url ./",
  15.     "deploy": "gh-pages -d dist"`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top