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

add support for including files that aren't namespaced #35

Closed
yoshuawuyts opened this issue Jan 17, 2016 · 4 comments
Closed

add support for including files that aren't namespaced #35

yoshuawuyts opened this issue Jan 17, 2016 · 4 comments

Comments

@yoshuawuyts
Copy link
Contributor

From #32

Scoping styles to components is ideal as a transform, but sometimes global files must be included too (such as reset.css). These files shouldn't be namespaced, but should be included in the resulting bundle.

  • What syntax do we want for this?
  • Should these files perhaps only be prepended during an exorcise step?
  • any other things to consider?
@yoshuawuyts yoshuawuyts added this to the transform-only milestone Jan 17, 2016
@ahdinosaur
Copy link
Member

strawman proposal:

var sheetify = require('sheetify')

sheetify('./reset.css', { global: true })

where everything is the same except it doesn't run the css through postcss-prefix and returns null.

@yoshuawuyts
Copy link
Contributor Author

yeah, this looks good to me! Would probably also want to support require calls with this syntax (#36):

var sheetify = require('sheetify')

sheetify('css-wipe', { global: true })
sheetify('css-scale', { global: true })
sheetify('css-type-base', { global: true })
sheetify('./index.css', { global: true })

@ahdinosaur
Copy link
Member

hehe, i was thinking the same. 😄

but then an open question is how do we distinguish between a module path and valid css? or is it obvious enough?

@yoshuawuyts yoshuawuyts mentioned this issue Feb 4, 2016
7 tasks
yoshuawuyts pushed a commit to yoshuawuyts/sheetify that referenced this issue Feb 5, 2016
Supersedes stackcssGH-29 stackcssGH-38

Implements stackcssGH-31

Precedes stackcssGH-21 stackcssGH-34 stackcssGH-35 stackcssGH-39

This is a wip patch, as it touches almost every line of code currently
present. It implements stackcss#31 mostly, but should provide the groundworks to
further expand upon. Also implementing tests as we go to verify features
work as advertised.

The most notable change is that this patch now uses `falafel` to modify
esprima nodes, as seen in
[hyperxify](https://github.com/substack/hyperxify). This allows require
calls to work both with template strings as with file requires.

progress
--------
- [x] detect and namespace template strings
- [x] write tests for template string modification
- [x] detect, read, and namespace files from disk
- [x] write tests for reading and transforming files
- [x] write tests for server - returns prefix if vanilla node
- [ ] write tests for correct plugin resolution
- [x] write tests for CSS injection in header in transform

clean up

test: apply std-fmt

docs: annotate source

{transform,index} -> {index,sheetify}

docs: add tagged template docs

[tmp] transform: add tests

[tmp] transform: find template strings

[tmp] transform: more stuff

[tmp] transform: fix template strings

[tmp] {sheetify, transform} -> {index,transform}

[tmp] test/fixtures/ -> test/basic/

[tmp] deps: remove unused

[tmp] test: test server

[tmp] test: add coverage report

[tmp] server: fix tagged templates

[tmp] transform: detect disk calls

[tmp] server: only parse if in transform

[tmp] server: refactor core logic

[tmp] index: fix assert calls

[tmp] transform: make async

[tmp] transform: fix and test

[tmp] transform: fix disk read

[tmp] deps: remove dead dev deps

[tmp] test: rm dead fixtures

[tmp] docs: add plugin docs

[tmp] plugins: add tests

[tmp] transform: fix from cli

[tmp] docs: fix examples
yoshuawuyts pushed a commit to yoshuawuyts/sheetify that referenced this issue Feb 5, 2016
Supersedes stackcssGH-29 stackcssGH-38

Implements stackcssGH-31

Precedes stackcssGH-21 stackcssGH-34 stackcssGH-35 stackcssGH-39

This is a wip patch, as it touches almost every line of code currently
present. It implements stackcss#31 mostly, but should provide the groundworks to
further expand upon. Also implementing tests as we go to verify features
work as advertised.

The most notable change is that this patch now uses `falafel` to modify
esprima nodes, as seen in
[hyperxify](https://github.com/substack/hyperxify). This allows require
calls to work both with template strings as with file requires.

progress
--------
- [x] detect and namespace template strings
- [x] write tests for template string modification
- [x] detect, read, and namespace files from disk
- [x] write tests for reading and transforming files
- [x] write tests for server - returns prefix if vanilla node
- [ ] write tests for correct plugin resolution
- [x] write tests for CSS injection in header in transform

clean up

test: apply std-fmt

docs: annotate source

{transform,index} -> {index,sheetify}

docs: add tagged template docs

[tmp] transform: add tests

[tmp] transform: find template strings

[tmp] transform: more stuff

[tmp] transform: fix template strings

[tmp] {sheetify, transform} -> {index,transform}

[tmp] test/fixtures/ -> test/basic/

[tmp] deps: remove unused

[tmp] test: test server

[tmp] test: add coverage report

[tmp] server: fix tagged templates

[tmp] transform: detect disk calls

[tmp] server: only parse if in transform

[tmp] server: refactor core logic

[tmp] index: fix assert calls

[tmp] transform: make async

[tmp] transform: fix and test

[tmp] transform: fix disk read

[tmp] deps: remove dead dev deps

[tmp] test: rm dead fixtures

[tmp] docs: add plugin docs

[tmp] plugins: add tests

[tmp] transform: fix from cli

[tmp] docs: fix examples
yoshuawuyts pushed a commit that referenced this issue Feb 7, 2016
Supersedes GH-29 GH-38

Implements GH-31

Precedes GH-21 GH-34 GH-35 GH-39

This is a wip patch, as it touches almost every line of code currently
present. It implements #31 mostly, but should provide the groundworks to
further expand upon. Also implementing tests as we go to verify features
work as advertised.

The most notable change is that this patch now uses `falafel` to modify
esprima nodes, as seen in
[hyperxify](https://github.com/substack/hyperxify). This allows require
calls to work both with template strings as with file requires.

progress
--------
- [x] detect and namespace template strings
- [x] write tests for template string modification
- [x] detect, read, and namespace files from disk
- [x] write tests for reading and transforming files
- [x] write tests for server - returns prefix if vanilla node
- [ ] write tests for correct plugin resolution
- [x] write tests for CSS injection in header in transform

clean up

test: apply std-fmt

docs: annotate source

{transform,index} -> {index,sheetify}

docs: add tagged template docs

[tmp] transform: add tests

[tmp] transform: find template strings

[tmp] transform: more stuff

[tmp] transform: fix template strings

[tmp] {sheetify, transform} -> {index,transform}

[tmp] test/fixtures/ -> test/basic/

[tmp] deps: remove unused

[tmp] test: test server

[tmp] test: add coverage report

[tmp] server: fix tagged templates

[tmp] transform: detect disk calls

[tmp] server: only parse if in transform

[tmp] server: refactor core logic

[tmp] index: fix assert calls

[tmp] transform: make async

[tmp] transform: fix and test

[tmp] transform: fix disk read

[tmp] deps: remove dead dev deps

[tmp] test: rm dead fixtures

[tmp] docs: add plugin docs

[tmp] plugins: add tests

[tmp] transform: fix from cli

[tmp] docs: fix examples

Signed-off-by: Yoshua Wuyts <i@yoshuawuyts.com>

Closes #41
@yoshuawuyts yoshuawuyts mentioned this issue Feb 10, 2016
5 tasks
@yoshuawuyts
Copy link
Contributor Author

Closed by #46

ahdinosaur added a commit that referenced this issue Feb 16, 2016
Supersedes GH-29 GH-38

Implements GH-31

Precedes GH-21 GH-34 GH-35 GH-39

This is a wip patch, as it touches almost every line of code currently
present. It implements #31 mostly, but should provide the groundworks to
further expand upon. Also implementing tests as we go to verify features
work as advertised.

The most notable change is that this patch now uses `falafel` to modify
esprima nodes, as seen in
[hyperxify](https://github.com/substack/hyperxify). This allows require
calls to work both with template strings as with file requires.

progress
--------
- [x] detect and namespace template strings
- [x] write tests for template string modification
- [x] detect, read, and namespace files from disk
- [x] write tests for reading and transforming files
- [x] write tests for server - returns prefix if vanilla node
- [ ] write tests for correct plugin resolution
- [x] write tests for CSS injection in header in transform

clean up

test: apply std-fmt

docs: annotate source

{transform,index} -> {index,sheetify}

docs: add tagged template docs

[tmp] transform: add tests

[tmp] transform: find template strings

[tmp] transform: more stuff

[tmp] transform: fix template strings

[tmp] {sheetify, transform} -> {index,transform}

[tmp] test/fixtures/ -> test/basic/

[tmp] deps: remove unused

[tmp] test: test server

[tmp] test: add coverage report

[tmp] server: fix tagged templates

[tmp] transform: detect disk calls

[tmp] server: only parse if in transform

[tmp] server: refactor core logic

[tmp] index: fix assert calls

[tmp] transform: make async

[tmp] transform: fix and test

[tmp] transform: fix disk read

[tmp] deps: remove dead dev deps

[tmp] test: rm dead fixtures

[tmp] docs: add plugin docs

[tmp] plugins: add tests

[tmp] transform: fix from cli

[tmp] docs: fix examples

Signed-off-by: Yoshua Wuyts <i@yoshuawuyts.com>

Closes #41
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