These are chat archives for systemjs/systemjs

12th
Jan 2015
Justin Meyer
@justinbmeyer
Jan 12 2015 06:59
@trusktr How do you deal with tests if you are using directories.lib?
do you put all your test JS's in your lib folder?
I'm unable to have a /src and a /test b/c if I import something like test/test.js
it looks in /src/test/test.js
when I want it to go to /test/test.js
Joe Pea
@trusktr
Jan 12 2015 07:03
Yeah, this is a problem with jspm/systemjs. I’ve kind of noted this to @guybedford at jspm/jspm-cli#386
Joe Pea
@trusktr
Jan 12 2015 07:24
I’m honestly quite new to all this. I probably don’t understand what directories.lib is for, but jspm/jspm-cli#388
Joe Pea
@trusktr
Jan 12 2015 08:02
@justinbmeyer I’ll let you know when I get to testing. xD
Guy Bedford
@guybedford
Jan 12 2015 08:03
nice to see users helping users!
for the directories.lib stuff
that is supposed to just be "application code"
as in the code you would publish
to load another folder like "test"
just import it
System.import('test/*')
System.import('myapp/*')
where package.json name == 'myapp', directories.lib = 'src'
Joe Pea
@trusktr
Jan 12 2015 08:07
@guybedford But can you do that when the test folder is outside the folder served by the server?
Guy Bedford
@guybedford
Jan 12 2015 08:08
no, both have to be inside the baseURL
Joe Pea
@trusktr
Jan 12 2015 08:08
What would be the suggested way to keep dev code from existing in the served baseURL?
Guy Bedford
@guybedford
Jan 12 2015 08:10
right so you're talking about switching to a "production" baseURL
Joe Pea
@trusktr
Jan 12 2015 08:10
yeah!!
Guy Bedford
@guybedford
Jan 12 2015 08:10
the issue is that invovles copying the entire project into a "production project"
haven't really provided a solution at this level yet - it is up to you
not sure where that will go yet
for now, I would suggest a single baseURL with everything in there
production and dev
its just much easier
then have ignore paths of dev for server
also note that with source maps, you do actually want the dev code in public
so bundles can load the original sources
Joe Pea
@trusktr
Jan 12 2015 08:12
yeah, that’s one thing I thought of too, but definitely not as nice as simply serving a folder without worrying about server rules.
Is that how source aps work? I thought the browser only needed the compiled code plus the map?
Guy Bedford
@guybedford
Jan 12 2015 08:14
you can include source in the source map
but it's probably better not to
and have the src folder served
Joe Pea
@trusktr
Jan 12 2015 08:15
I might misunderstand source maps. Isn’t the purpose so that the browser only ever receives compiled code, and the map let the browser uncompile it?
Joe Pea
@trusktr
Jan 12 2015 09:20
@guybedford Hey why not make plugins for systemjs prefixed with systemjs- so that they can be shipped to npm? e.g. systemjs-css
It’d make sense because for browserify there’s cssify, following the *ify namespace.
Joe Pea
@trusktr
Jan 12 2015 09:27
The reason is because if I tell someone “install famous infamous and css” then they might wonder what’s css, and there’s no such project called css. jspm install infamous famous systemjs-css would be cleeeeean, promoting systemjs.
Joe Pea
@trusktr
Jan 12 2015 09:41
Or perhaps system-? system-css system-jsx system-jade
Justin Meyer
@justinbmeyer
Jan 12 2015 18:45
@trusktr perhaps use steal-tools for your production build which does this for you :-)
Joe Pea
@trusktr
Jan 12 2015 20:12
@justinbmeyer Got a quick sample workflow example?
@justinbmeyer Are you talking about dev vs prod?