Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build configuration for excluding html templates and text plugin #379

Closed
deeptechtons opened this issue Feb 12, 2013 · 1 comment
Closed

Comments

@deeptechtons
Copy link

I got the below build configuration file

    baseUrl: ".",
    //paths to modules
    paths: {
        widgetModel: "model/widget",
        widgetView: "views/widget",
        widgetsView: "views/widgets",
        widgets: "collection/widgets",
        appView: "views/app",
        widgetCreate: "views/create",
        text: "../library/text",
        localStore: "../library/store",
        disabledWidgets: "views/disabledWidget"
    },
    //exclude templates for fast development
    excludeShallow: ["views/widget", "views/widgets", "views/app", "views/create", "views/disableWidget"],
    //name of optimized file
    name: "app",
    dir: "output",
    keepBuildDir: false
})

It does the below

  1. Creates a output folder
  2. Copies all the files
  3. Optimizes app.js with it's dependencies

Here's what i want it to do

  1. Create folder named output
  2. Exclude the html templates, localstore and text plugin ( load them using require() commands or some other fancy way) from the build
  3. Generate a minified file app-build.js
  4. Make sure only app-build.js is the only file inside output folder

What is the modified config for my requirement.

@jrburke
Copy link
Member

jrburke commented Feb 13, 2013

If you want to exclude all text templates, set inlineText: false.

Then add 'text' and the localstorage plugin to the 'excludeShallow' list.
More details on all the config options here:

https://github.com/jrburke/r.js/blob/master/build/example.build.js

If you only want one JS file built, instead of using dir: use out: for a single JS file build.

@jrburke jrburke closed this as completed Feb 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants