Giter Club home page Giter Club logo

etch_n_sketch_project's Introduction

Etch-n-sketch

A etch-n-sketch app that allows user to draw by hovering over the tile. Can switch to a party mode where colors are random. Also can set the number of squares in the grid. Built with dom manipulation, bootstrap, HTML, and CSS.

Etch-n-sketch

Built from the 4GeeksAcademy vanillajs boilerplate here: https://github.com/4GeeksAcademy/vanillajs-hello

Hello World with Vanilla JS

Requirements: Make sure you have node version 8

install the breathecode cli (command-line-interface)

npm i breathecode-cli -g
Download the boilerplate using the BreatheCode CLI
$ bc start:vanillajs-project -r
and install the npm package:
$ npm install

Build and Start coding!

Build the application for the first time...

$ npm run build

And start coding your Vanilla.js application, update the index.html, index.css or index.js depending on your needs.

FAQ

1) How do I run my code in Cloud 9?

Right click on ./index.html and choose the RUN option on the menu.

2) Where do I write my code?

It depends on the language, but you have ./src/js/index.js, ./src/css/index.css and ./index.html respectively, you can add new .html as you please, just make sure to include the bundle.js using the <script> tag.

Note: remember that the JS workflow starts inside window.onload.

3) I don't see my changes.

Remember that you have to re-bundle every time you update your SCSS or JS files $ npm run build. Remember also to refresh cleaning the cache (command+shift+r on mac, control+shift+r on pc & linux)

4) I ran $ npm run build and I still don't see my changes

Please check the output on the console after bundling; maybe you have an error when bundling. Also, check the chrome inspector for errors on the console.

5) How do I include more images on my project?

Just add them into your HTML file, the same way you did before knowing about WebPack.

6) How do I include more JS files?

If the JS file is not your own, you can import it using <script> tags on your index.html before the </body> closing tag. If the file is yours is better to add it using the import statement inside index.js content.

7) How can I run the development server?

This boilerplate does not support the webpack development server; you have to $ npm run build every time you update your JS or SCSS files.

8) How do I publish the website?

This boilerplate is 100% compatible with the free github pages hosting. Publish your website by runing:

$ npm run deploy

Very easy and in just one step! Push to your master branch and use the free hosting that comes with GitHub pages, the project is ready to be published. Remember to choose to run the Github Page from your master branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.