Skip to content

Instantly share code, notes, and snippets.

@esova-ana
Last active March 8, 2019 11:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esova-ana/2faa2a1578195cb7cfda326d24eda19a to your computer and use it in GitHub Desktop.
Save esova-ana/2faa2a1578195cb7cfda326d24eda19a to your computer and use it in GitHub Desktop.
Create new project
/*-----------------------------------------------------------------
START NEW PROJECT (in the terminal)
------------------------------------------------------------------*/
$ mkdir myProject // creates a folder myProject
$ cd myProject // change directory to myProject
$ npm init
// install all the modules
$ atom index.js # copy & paste regl.party/exapmples content, save & close
$ npm install regl --save
$ echo "<body><script src="bundle.js"></script></bundle>" > index.html
$ npm install browserify-livereload watchify --save-dev
// add to `package.json` `..."scripts": {}...` section and save file
// "start": "watchify index.js -p [ browserify-livereload --host 127.0.0.1 --port 1337 ] -o bundle.js -dv",
$ npm start
// open "index.html" in browser
@mikintosh
Copy link

Izmenite ovo:
echo "<script src="bundle.js"></script>" > index.html
u ovo
echo "<script src="bundle.js"></script>" > index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment