Giter Site home page Giter Site logo

jk_video's Introduction

Vintage

Vintage start project (with webpack chunks auto generation).

Overview

Installation

In order to start working with project, you must:

Clone repository to your local machine

git clone https://bitbucket.org/vintageua/vintage-start-proj.git

Install dependencies

npm

npm i -g jscs && npm i

yarn

yarn add global jscs && yarn install

WebStorm configuration

Turn off 'Safe write' option

Settings | Appearance & Behavior | System Settings | Use "safe write"

Change ECMAScript version

Settings | Languages & Frameworks | Javascript | Javascript language version: "ECMAScript6"

Enable JSCS linter

Settings | Languages & Frameworks | Javascript | Code Quality Tools | JSCS | "Enable"

NPM scripts

Start development

npm run development

Build production bundle (build '.min' files, prettify html)

npm run production

Code splitting

If your project is going to be large and you want to split index.js file into separate modules, use webpack-chunks branch of this repository:

git checkout webpack-chunks

Then add a new chunk:

require.ensure([], require => {
  const loadedChunk = require('path/to/chunk');

  // do stuff with loaded module

}, 'chunkFileName');
Warning!

You should restart task (e.g. development) after adding a new chunk. Issue #26

Public API

Path: js/components/publicAPI (example)

Public API is created for back-end developers.

It should contain methods to attach / initialize / destroy jquery plugins etc.

JSDoc

Install JSDoc globally

npm install jsdoc -g

Generate docs

npm run-script compileDocs

Open docs

npm run-script openDocs

Notes

  1. Before pushing to Bitbucket repository (or before transferring the project to Back-end department) make sure to run production bundle.
  2. Ensure all of your Public API's has both init and destroy methods.
  3. Always restart task (e.g. development) after adding a new chunk.

Built with

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.