Giter VIP home page Giter VIP logo

component-builder-typescript's Introduction

component-builder-typescript

typescript compiler plugin for component

Overview

one of the best things about component is having access to every file required to build your application before the build starts. the other best thing about component is having access to the dependency tree.

component-builder-typescript uses this information to minimise the number of files read and compiled which produces a highly optimised build.

when used in a watch task component-builder-typescript performs incremental builds, only compiling components which have changed and their dependents.

component-builder-typescript will generate an external definition file for your component (using dts-bundle) which can be used by your IDE or distributed with JavaScript.

component-builder-typescript uses version 1.4 of the typescript compiler

API

componentBuilderTypescript(options);

options:

Name Description Default
fields fields to use ['scripts']
declareRequire include a commonjs require declaration false
declaration generate an external declaration file true
sourceMap generate source maps for component-builder false
inlineSourceMap generate inline source maps in the generated code false
gulpMode use gulp-style logging false
ignoreRemoteFilesRx ignore remote source files matching this regex
strict when false all declaration files will be incuded true
noImplicitAny typescript compiler option false
removeComments typescrpt compiler option false

component.json

fields

by default component-builder-typescript will use typescript files found in the 'scripts' field of your component.json, but you can override this using the 'fields' property of the configuration options.

exported declarations

declaration files are generated for local components and components which have been linked using component link

you can specify the location of the generated external definition file like this:

{
    "name" : "component-builder-typescript-example",
    "typescript" : {
        "definition": "exports/component-builder-typescript-example.d.ts"
    },
    "dependencies" : {
        "component/jsdomify": "1.3"
    },
    "main" : "example/example.ts",
    "scripts" : [
        "exports/component-builder-typescript-example.d.ts",
        "example/_dependencies.d.ts",
        "example/example.ts",
        "example/example-types.d.ts"  
    ]
}

Credits

Greg Smith Tsify Bart van der Schoor dts-bundle

component-builder-typescript's People

Contributors

frankwallis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.