Coder Social home page Coder Social logo

ng2-fused's People

Contributors

alex-klock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng2-fused's Issues

Amazing plugin!!

Hi!
Wanted to say how amazing this plugin is. Could you update it to the latest fusebox version?
We are about to release 2.0 - a major release with many changes. And your plugins works like a charm.

It should be a part of ng2-example.

http://fuse-box.org:3333/

That's the full config I personally tested with 2.0.0-beta.19

const {
    FuseBox,
    SassPlugin,
    CSSPlugin,
    WebIndexPlugin,
    TypeScriptHelpers,
    JSONPlugin,
    HTMLPlugin,
    UglifyJSPlugin,
    RawPlugin
} = require('fuse-box');
const { Ng2TemplatePlugin } = require('ng2-fused');

const path = require("path");

const fuse = FuseBox.init({
    homeDir: `src/`,
    output: `dist/$name.js`,
    plugins: [
        WebIndexPlugin({
            title: "FuseBox + Angular",
            template: "src/angular/index.html"
        }),
        // https://github.com/alex-klock/ng2-fused
        Ng2TemplatePlugin(),

        // styles
        ['angular/main.scss', SassPlugin(), CSSPlugin()],
        ['angular/components/todo/**.scss', SassPlugin(), RawPlugin()],
        
        // etc
        JSONPlugin(),
        HTMLPlugin({ useDefault: false })
    ]
});

// setup development sever
fuse.dev({ port: 3000 });

// bundle vendor
fuse.bundle("vendor")
    .hmr()
    .instructions("~ angular/main.ts")

// bundle application
fuse.bundle("app")
    .sourceMaps(true)
    .instructions(" !> [angular/main.ts]").watch().hmr()


// run the factory
fuse.run();

Thanks a million!

Why the extra RawPlugin when importing StylesUrl?

Hi Alex, thanks for the plugin, it looks very promising.

I'm sorry to ask here but there's not much support for fusebox still out there.
I'm using your plugin to use templateUrl and stylesUrl in my app and with my configuration

plugins: [
    [SassPlugin(), CSSPlugin()],
    CSSPlugin(),
    Ng2TemplatePlugin()
]

I see in my bundled app.js that the regular imports have been converted to

AppComponent = __decorate([
    core_1.Component({
        selector: 'app',
        template: '\n    <arc-form></arc-form>\n  ',
        styles: [require('./app.component.scss')],
        encapsulation: core_1.ViewEncapsulation.None
    }),

so, my template has been imported directly and the styles transformed to a require.
As I already have [SassPlugin(), CSSPlugin()], configured, shouldn´t this work already as it is?

Why do you recommend to use RawPlugin instead?

    plugins: [
        Ng2TemplatePlugin(),
        ['*.component.html', RawPlugin()],
        ['*.component.css', RawPlugin()]
     //   or with a css pre/post processor...
     // ['*.component.css', PostCss([precss()]), RawPlugin()]   
    ]

Thanks!

SCSS conversion flow

Is is possible convert .scss to css then use this plugin? I would like to maintain the .css in the angular app stylesUrl, but can't seem to figure it out yet. FuseBox is awesome so far, but need to know if a few things can work before moving larger apps to this build tooling.

Auto require scss with same name as template

Hey Alex,

I am using ionic2 to build an app and I am also using fusebox and your plugin to build the app.

To make switching as easy as possible it would be nice to automatically require the .scss files with the same name as the templateUrl as this is what ionic-app-scripts does out of the box.

I have forked your repo and did a (quick and dirty) fix.

https://github.com/mitsoe/ng2-fused

I was wondering if you could implement similar functionality in your plugin aswel.

Kind regards,

Mitch

Nested lazy loading

Does your plugin support nested lazy modules (folder within folder using + syntax)?

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.