1.1.4 • Published 6 years ago

tronic v1.1.4

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

tronic

tronic is a framework-agnostic webpack bundler with sensible defaults, aimed at reducing configuration and the amount of dependencies needed to be installed.

For an introduction and explanation behind the inspiration, please feel free to read this Medium article.

Getting started

Install with npm:

npm install --save-dev tronic

Add the following scripts to your package.json:

{
  "scripts": {
    "start": "tronic",
    "build": "tronic build"
  }
}

You can start the development server using npm start.

You can generate a one-off build using npm run build, and a watching build using npm run build -- --watch or npm run build -- -w.

Configuration

tronic ships with webpack settings for popular use cases and can be extended by utilising the tronic.config.js file at the root of your project. tronic will merge your local configuration with its webpack defaults to produce a bundle. You may provide an object to be merged with the webpack defaults, or a function that extends the defaults and returns the updated config.

module.exports = {
  webpack: {
    entry: 'index.js'
  }
}
module.exports = {
  webpack: (config) => {
    config.entry = 'index.js'
    return config
  }
}

Plugins

You can further extend tronic with in-house and community-created plugins as below. Each plugin ships with its own set of defaults and can be extended similar to how you'd extend the webpack config above.

A list of available plugins can be found at https://github.com/tronite/tronic-plugins.

module.exports = {
  plugins: [
    'tronic-plugin-babel',
    'tronic-plugin-sass',
    { name: 'tronic-plugin-html', options: { htmlWebpackPlugin: { ... } } }
  ]
}

Defaults

tronic adheres to the main property in your package.json for the default entrypoint of the application. If that's not defined, it will use src/index.js.

Similarly, the default bundle location is the dist folder.

For a further look into preset defaults, please take a look at defaults.js.

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0-beta.15

6 years ago

1.0.0-beta.14

6 years ago

1.0.0-beta.13

6 years ago

1.0.0-beta.12

6 years ago

1.0.0-beta-11

6 years ago

1.0.0-beta.10

6 years ago

1.0.0-beta.9

6 years ago

1.0.0-beta.8

6 years ago

1.0.0-beta.7

6 years ago

1.0.0-beta.6

6 years ago

1.0.0-beta.5

6 years ago

1.0.0-beta.4

6 years ago

1.0.0-beta.3

6 years ago

1.0.0-beta.2

6 years ago

1.0.0-beta.1

6 years ago

1.0.0-beta.0

6 years ago

1.0.0

6 years ago