Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

CSS Assets #44

Closed
ryanflorence opened this issue Jun 14, 2011 · 10 comments
Closed

CSS Assets #44

ryanflorence opened this issue Jun 14, 2011 · 10 comments

Comments

@ryanflorence
Copy link

A lot of clientside stuff has need of assets for the script (like a UI library).

Perhaps define "assets" in the package.json, then have ender pull them out of node_modules and toss them into an assets directory?

@ded
Copy link
Member

ded commented Jun 14, 2011

this is a great idea. i think we're looking into keeping everything tucked into the "ender" key so we're not populating packages with too many non-nodish things. with that said, we want to support the ability to pass in an options hash ...

"ender": {
  main: "path/to/main.js"
  , "other": "stuff"
  , "assets": "path/to/assets"
}

@fat
Copy link
Contributor

fat commented Jun 29, 2011

I was looking through the package.json spec and actually i think the best place to put this particular thing would be the directories key... so it would look like:

{
  "name": "fat",
  "version": "0.0.1",
  "authors": ["Jacob Thornton <@fat>"],
  "keywords": ["ender", "events", "event"],
  "main": "./fat.js",
  "ender": "./src/bridge.js",
  "directories": {
    "assets": "src/assets"
  }
}

@ryanflorence
Copy link
Author

That looks good to me with a couple questions:

  1. Does ender just assume you want the assets directory packaged up?
  2. Is this flexible enough? What if I've got two assets directories I want packaged up?

@ded
Copy link
Member

ded commented Jun 29, 2011

does ender just asume you want the assets directory packaged up?

perhaps..

$ ender build foo bar --noassets

or

$ ender build foo bar --includeassets

what if i've got two assets directories i want packaged up?

"directories": {
  "assets": ["src/a/assets", "src/b/assets"]
}

@fat
Copy link
Contributor

fat commented Jun 29, 2011

That's a good question... i'm starting to think we should limit the options (so we don't get options crazy like git). Less to learn i think is nice... What if we just pause the build process when we encounter an assets dir? We could ask if a user wants to include the dir for a specific package and we could also ask where they would like to put it.

@ryanflorence
Copy link
Author

I'd rather be scriptable and option crazy, than non-scriptable.

$ ender build foo --noassets

Would be my vote (or maybe --nobooty but I digress). Seems like if a script has assets, and ender is building, you should get the assets by default.

@ded
Copy link
Member

ded commented Jun 29, 2011

the other question is, where do those assets go? how does one publish them? (because they won't be able to live on NPM)

@fat
Copy link
Contributor

fat commented Jun 29, 2011

yeah they do/will... thats why we would use the directories key... we would just have to relocate them somewhere...

@jasonkuhrt
Copy link

Same issue here? #84

@rvagg
Copy link
Member

rvagg commented May 9, 2012

ref #131

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants