1.25.0 • Published 2 months ago

@swissquote/crafty v1.25.0

Weekly downloads
88
License
Apache-2.0
Repository
github
Last release
2 months ago

Description

crafty is the core package of Crafty, it gives the foundations to load presets and execute the tasks and commands created by them.

Crafty comes with three default commands, reads one configuration file and loads presets. All the rest is handled by presets.

The philosophy

Crafty's philosophy is that there are great build and automation tools out there, we don't want to reinvent them.

Gulp is awesome to create tasks and streams of work, Webpack is great at creating bundles, PostCSS and its plugin ecosystem is big. But what plugins and loaders should we use for our needs ?

Crafty's philosophy is that if you wish to use Gulp and Webpack together, it should be easy. If you want to use TypeScript instead of Babel, it should be a single configuration line change.

The default configuration should allow you to get started in a couple of minutes, but you should be able to fine-tune the configuration to your needs.

Another aspect is that configuring your build process once is one thing, keeping it up-to-date is more complicated. Does a new major version of PostCSS work with my existing plugins ? Does this minor update introduce a breaking change by mistake ? Crafty takes care of that heavy lifting and helps you keep your package.json small.

What's inside

Bundles

In Crafty, a bundle is a piece of configuration that represents one or more source files and one destination file. (In some cases, more than one destination file.)

Each bundle has to be treated by a runner.

Runners

A runner's purpose is to take a bundle and turn it into a task that will then take your files and compile them.

Each runner can be augmented with presets.

Presets

Presets are a way to extend Crafty's capabilities with new tasks, commands, runners and configuration.

Each preset can use any number of extension points (functions) that will be executed by crafty or other presets.

We have an extension point that can override the configuration, an extension point to add Babel plugins (provided by the Babel preset) and more.

Read more about the anatomy of a preset

Existing runners and presets

  • crafty-runner-webpack Use this runner to bundle your code with Webpack.
  • crafty-runner-gulp Use this runner to be able to create Gulp tasks in your projects.
  • crafty-preset-babel EcmaScript 2015+ support with Babel and ESLint with our linting rules.
  • crafty-preset-postcss Compile your CSS using PostCSS, works with Webpack and Gulp.
  • crafty-preset-typescript This preset provides TypeScript support and configures ESLint with our linting rules.
  • crafty-preset-images This preset compresses your SVG/PNG/JPG/GIF files.
  • crafty-preset-images-simple If you are behind a corporate proxy, this preset will copy images without compressing them.
  • crafty-preset-maven This preset overrides the destination to move your compiled assets to the right directory in target of your Maven project.
  • crafty-preset-react A preset that provides default configuration when using React in a project. JSX Compilation is handled by the crafty-preset-babel already (Not Ready)
  • crafty-preset-jest This preset will add Jest to the crafty test command, works with Babel and TypeScript.
1.25.0

2 months ago

1.25.0-alpha.4

2 months ago

1.25.0-alpha.2

2 months ago

1.25.0-alpha.3

2 months ago

1.24.0-alpha.1

4 months ago

1.24.0

4 months ago

1.23.0-alpha.1

7 months ago

1.23.0-alpha.2

7 months ago

1.23.0

7 months ago

1.22.0-alpha.3

1 year ago

1.22.0-alpha.5

1 year ago

1.22.0-alpha.4

1 year ago

1.22.0

1 year ago

1.22.0-alpha.6

1 year ago

1.22.3

12 months ago

1.22.1

1 year ago

1.22.2

12 months ago

1.22.0-alpha.2

1 year ago

1.22.0-alpha.1

1 year ago

1.21.0

1 year ago

1.21.1

1 year ago

1.21.0-alpha.2

1 year ago

1.21.0-alpha.1

1 year ago

1.20.0-alpha.4

2 years ago

1.20.0

2 years ago

1.20.0-alpha.2

2 years ago

1.20.0-alpha.3

2 years ago

1.20.0-alpha.1

2 years ago

1.19.0

2 years ago

1.19.1

2 years ago

1.18.5-alpha.3

2 years ago

1.18.5-alpha.4

2 years ago

1.18.5-alpha.2

2 years ago

1.18.5-alpha.1

2 years ago

1.18.1

2 years ago

1.18.0

2 years ago

1.18.4

2 years ago

1.18.3

2 years ago

1.18.2

2 years ago

1.17.3-alpha.25

2 years ago

1.17.3-alpha.26

2 years ago

1.17.3-alpha.23

2 years ago

1.17.3-alpha.24

2 years ago

1.17.3-alpha.21

2 years ago

1.17.3-alpha.22

2 years ago

1.17.3-alpha.20

2 years ago

1.17.3-alpha.18

2 years ago

1.17.3-alpha.19

2 years ago

1.17.3-alpha.17

2 years ago

1.18.1-alpha.2

2 years ago

1.18.1-alpha.3

2 years ago

1.18.1-alpha.1

2 years ago

1.17.3-alpha.3

2 years ago

1.17.3-alpha.4

2 years ago

1.17.3-alpha.2

2 years ago

1.17.3-alpha.7

2 years ago

1.17.3-alpha.8

2 years ago

1.17.3-alpha.5

2 years ago

1.17.3-alpha.6

2 years ago

1.17.3-alpha.16

2 years ago

1.17.3-alpha.14

2 years ago

1.17.3-alpha.9

2 years ago

1.17.3-alpha.15

2 years ago

1.17.3-alpha.12

2 years ago

1.17.3-alpha.13

2 years ago

1.17.3-alpha.10

2 years ago

1.17.3-alpha.11

2 years ago

1.17.3-alpha.1

2 years ago

1.17.2

2 years ago

1.17.0-beta.1

2 years ago

1.17.1

2 years ago

1.16.3

3 years ago

1.16.1

3 years ago

1.16.1-beta.1

3 years ago

1.16.0

3 years ago

1.16.0-beta.5

3 years ago

1.16.0-beta.6

3 years ago

1.16.0-beta.3

3 years ago

1.16.0-beta.4

3 years ago

1.16.0-beta.2

3 years ago

1.16.0-beta.1

3 years ago

1.16.0-beta.0

3 years ago

1.15.0-beta.0

3 years ago

1.15.0

3 years ago

1.14.0

3 years ago

1.14.0-beta.8

3 years ago

1.14.0-beta.7

3 years ago

1.14.0-beta.4

3 years ago

1.14.0-beta.6

3 years ago

1.14.0-beta.5

3 years ago

1.14.0-beta.3

3 years ago

1.13.7

3 years ago

1.13.6-beta.0

3 years ago

1.14.0-beta.2

3 years ago

1.14.0-beta.1

3 years ago

1.13.5

4 years ago

1.13.5-beta.1

4 years ago

1.13.5-beta.0

4 years ago

1.13.4

4 years ago

1.13.0-beta.2

4 years ago

1.13.2

4 years ago

1.13.0

4 years ago

1.13.3

4 years ago

1.13.0-beta.1

4 years ago

1.13.0-beta.0

4 years ago

1.12.1-beta.1

4 years ago

1.12.1-beta.2

4 years ago

1.12.1-beta.0

4 years ago

1.12.0

4 years ago

1.12.0-beta.0

4 years ago

1.11.1

4 years ago

1.11.0

4 years ago

1.10.0

4 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.1-beta.0

5 years ago

1.4.0

5 years ago

1.3.1-alpha.27

5 years ago

1.3.0

6 years ago

1.2.2-alpha.22

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago