Crafty
  • Getting Started
  •  Use Cases
    • Compiling CSS
    • Compiling JavaScript
    • Compiling TypeScript
    • Compressing Images
    • Testing your code
  •  User Guides
    • Configuring the build in a blank project
    • Configuring the build in a maven project
    • Create a configuration file
    • Autofix Resources
    • crafty.config.js Available Options
    • Developing Faster with Crafty watch
  •  Packages
    •  crafty
      • Anatomy of a preset
      • The Crafty instance
    • crafty-runner-gulp
    • crafty-runner-webpack
    •  crafty-preset-babel
      • JavaScript Features
    •  crafty-preset-eslint
      • ESLint IDE Integration
      • JavaScript Linting
      • TypeScript Linting
    • crafty-preset-images
    • crafty-preset-images-simple
    •  crafty-preset-jest
      • Jest IDE Integration
    •  crafty-preset-lightningcss
      • crafty-preset-maven
      •  crafty-preset-postcss
        • CSS Features
        • Postcss Extension API
      • crafty-preset-prettier
      • crafty-preset-react
      •  crafty-preset-stylelint
        • CSS Linting
        • Stylelint IDE Integration
      • crafty-preset-swc
      •  crafty-preset-typescript
        • Getting Started with TypeScript
        • TypeScript Features
        • TypeScript Typings
      • babel-preset-swissquote
      • eslint-plugin-swissquote
      • postcss-swissquote-preset
      • stylelint-config-swissquote
    • CLI
    • IDE Integration
    • Troubleshooting
    • Why

    Technical blog
    Swissquote
    GitHub


    © 2018 Swissquote Bank SA. Powered by Daux.io.

    User Guides Configuring the build in a blank project

    Table of Contents

    • package.json
    • .gitignore
    • Next

    #package.json

    in package.json add:

    {
      "name": "your-project-name",
      "version": "1.0.0",
      "scripts": {
        "run": "crafty run",
        "watch": "crafty watch"
      }
    }
    

    #.gitignore

    add this to your .gitignore

    node_modules/**
    

    This applies to Mercurial as well, but the file name would be .hgignore

    #Next

    The next step is to add your presets and bundles

    • Previous
    • Next