nodeart-components-loader

    2.1.56 • Public • Published

    Nodeart-Components-Loader

    Angular 2 webpack loader that convert templates and styles paths in components if there are custom templates.

    Tutorial

    1. In your webpack config file add path to custom templates and style folders. For getting path to project's root use app-root-path Example:
    let appRoot = require('app-root-path');
    let path = require('path');
    let templatesPath = path.join(appRoot + '/src/@nodeart/templates');
    let stylesPath =  path.join(appRoot + '/src/@nodeart/styles');
    1. Install nodeart-components-loader from npm:
    npm install --save nodeart-components-loader
    
    1. Add loader to webpack config file
    test: /\.ts$/,
    loaders: [
        'nodeart-loader?templatesPath=' + templatesPath + '&stylesPath=' + stylesPath
        ]
    1. Create custom html template in your templates folder with the same origin template. Loader will change path.
    2. Finish

    Keywords

    none

    Install

    npm i nodeart-components-loader

    DownloadsWeekly Downloads

    0

    Version

    2.1.56

    License

    ISC

    Last publish

    Collaborators

    • nodeart