Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

dist is missing in the npm package #122

Open
nLight opened this issue Feb 15, 2018 · 4 comments
Open

dist is missing in the npm package #122

nLight opened this issue Feb 15, 2018 · 4 comments
Assignees

Comments

@nLight
Copy link
Contributor

nLight commented Feb 15, 2018

Hey @ashenden!

Trying to optimize dcos-ui build time I discovered that dist directory is missing from the build. When I tried to run npm run dist locally it would fail with

[10:30:43] Using gulpfile ~/workspace/cnvs/gulpfile.js
[10:30:43] Starting 'cnvs:styles'...
[10:30:52] Plumber found unhandled error:
 TypeError in plugin "gulp-autoprefixer"
Message:
    this is not a typed array.
Details:
    fileName: /Users/dmitriy/workspace/cnvs/styles/cnvs.css

Stack:
TypeError: this is not a typed array.
    at Function.from (native)
    at /Users/dmitriy/workspace/cnvs/node_modules/gulp-autoprefixer/index.js:26:27
    at process._tickCallback (node.js:369:9)
[10:30:52] Finished 'cnvs:styles' after 8.79 s

What I was trying to to is aggregating all the variables so we could import them while having the rest of the source code imported as css. Does it even make sense?

Thanks!

@ashenden
Copy link
Contributor

Not completely sure I follow you. Could you break this down further?

@nLight
Copy link
Contributor Author

nLight commented Feb 15, 2018

  1. The dist directory with compiled css is missing when I do npm install cnvs
  2. When I clone the repo and try compiling the dist with npm run dist I get the error.

@ashenden
Copy link
Contributor

Ah. Ok. So, you want the compiled styles as part of the package. To be honest, I wrote the package definition a didn't really know what I was doing. Maybe you have some suggestions as to how it could be better structured? What I wanted at the time, but didn't know how, was to have the package to have the following structure when you run npm install cnvs...

/components
/content
/layout
/utilities
cnvs.less
cnvs.css
cnvs.css.map
cnvs.min.css
cnvs.min.css.map

^^ all in the top level of the package, not nested in a /styles folder.

@nLight nLight self-assigned this Feb 16, 2018
@nLight
Copy link
Contributor Author

nLight commented Feb 16, 2018

The main idea is to have a compiled bundle because compiling it ad-hoc in dcos-ui is so slow.
Let me think how the package can be improved.

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

No branches or pull requests

2 participants