New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

trolly

Package Overview
Dependencies
Maintainers
1
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trolly

Isomorphic boilerplate for creating libraries. Using Babel 6.x, Webpack, Karma and ESLint

  • 0.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52
decreased by-41.57%
Maintainers
1
Weekly downloads
 
Created
Source

A isomorphic boilerplate written in ES2015 for Node and the browser.

Travis Status Coverage Status Dependency Status

Features

  • Babel 6.x support
  • Mocha-Chai-Sinon testing stack
  • Support for ES2015 in the unit tests
  • Unit tests that work in Node and in the browser
  • Unit tests for older IE
  • Unit tests for production mode
  • Unit tests for development mode with auto-watch
  • Export as ES5 & UMD
  • Coverage report on the command line
  • Flow comments
  • Works both server and client side
  • Karma
  • Webpack
  • Webpack server for development
  • Eslint
  • Execution environment ala React
  • Production mode
  • Development mode
  • Pre-publishing to NPM
  • Support NodeJS v. 4.x LTS and the 'stable' branch ( v.5x)
  • NPM v. 3.3.6 support

Basic guide

Write your code in src. The entry file is what you named the project in kebab case (although the filename can be changed).

Run webpack to build a non-minified version of the library.

Put your unit tests in the __tests__ folder. The npm test command runs the tests using Node.

npm Scripts

  • npm run lint - Lint the source and unit tests

  • npm run build - Build a distributable version of the library

  • npm run dev-server - Run the development server ( port 5000)

  • npm run prebuild - clean up the dist folder

  • npm run test - Runs the unit tests with karma

  • npm run test:browser - Runs the unit tests with karma and Chrome

  • npm run karma:server - Runs the unit tests with karma and PhantomJS

  • npm run karma:watch - Runs the unit tests with karma tests and continuously run the unit tests as you make changes to the source and test files themselves

  • npm run coverage - Generate a coverage report

  • npm run spec - Runs the unit tests with Mocha

  • npm run spec:watch - Runs the unit tests with Mocha and continuously run the unit tests as you make changes to the source and test files themselves

  • npm run packages - Shows all installed dependencies

  • npm run package:purge - Remove all dependencies

  • npm run package:reinstall - Reinstall all dependencies

  • npm run package:updates - Generate a list overview for newer dependencies

  • npm run package:upgrade - Automaticly upgrade all dependencies and update package.json

Unit tests

Units tests are done in the background and visible in the cli together with the generated coverage report.

Linting

This boilerplate uses ESLint to lint your source. To change the rules, edit the .eslintrc file in the root directory, respectively.

Installation

Download the package, and run this from the command line:

npm install 

Development server

Included with Trolly is a development server, but you need to customize it yourself to get it usefull.

Start the server with npm run dev-server and open port 5000.

All customizing has to be done in the webpack-dev-server.js file.

The index.html are located in the root.

Customizing

This boilerplate is easily customizable. Add your dependencies to the package.json file, and adjsut the webpack section inside the karma.config.js after your own needs.

Do not set anything inside the webpack.config. Everything are maintained by karma.

Keywords

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc