frontend / toolbox-utils Goto Github PK
View Code? Open in Web Editor NEWGulp tasks for Toolbox projects —
Home Page: https://frontend.github.io/toolbox/
License: MIT License
Gulp tasks for Toolbox projects —
Home Page: https://frontend.github.io/toolbox/
License: MIT License
Using node v9.3.0
, when I yarn install
into a fresh project, the installation never finish an keep during on:
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "[email protected]" has unmet peer dependency "[email protected] - 3".
warning "[email protected]" has unmet peer dependency "popper.js@^1.12.9".
warning "[email protected]" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
warning "[email protected]" has unmet peer dependency "postcss@^6.0.0".
[4/4] 📃 Building fresh packages...
[1/4] ⠂ fsevents
[1/4] ⠄ fsevents
[1/4] ⠐ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
[1/4] ⠠ fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
[2/4] ⠠ uws
[-/4] ⠂ waiting...
[-/4] ⠄ waiting...
[2/4] ⠄ uws
[3/4] ⠄ ttf2woff2: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
I resolve my problem by installing node-gyp
in my global npm.
npm install -g node-gyp
It's currently a dev-dependency.
🤷♂️
yarn start
does not start without it.
It looks like if you want to deploy the styleguide on web server that run Apache you get some error:
$ yarn build styleguide
# deploy your the build dir on the web server
Try to access http://myproject.dev/themes/toto/build/index.html`
You will get error like: http://myproject.dev/themes/toto/build/components/molecules/breadcrumb//breadcrumb.twig (Error 403)
Is node 12 required to build a project with toolbox from now on?
I did fiddle a bit to find out that switching to node 12 after having deleted my node_modules
folder, and after updating everything made my projet usable again.
Could be good to display a message if the user is not using the correct node version when using the project
We have to fix the icon.js
generation and restore the fonticons feature
You can't override the vendors CSS when the vendors are after our CSS, I don't know how we never encountered any issues with this before now 🤔
toolbox-utils/tasks/prepare.js
Lines 87 to 91 in e2ca3fc
When deploying the styleguide, you don't want the reader_path
variable to keep the local path. It should switch back to the rawgit one.
it looks like toolbox is not compatible with node 6 (use of trailing comma in function args list, use of async, etc).
It would be nice to see if we can be compatible with the maximum version of node and at least define with which version of nodejs this project is compatible.
Can you remove the yeoman-generator keyword from your package.json and then push that version please?
In the prepare task, we simply add :
if (!yargs.argv.dev) {
$(` <script src="../js/vendors.bundle.js"></script>\n`).appendTo('body');
$(` <script src="../js/app.bundle.js"></script>\n`).appendTo('body');
} else {
$(` <script src="vendors.bundle.js"></script>\n`).appendTo('body');
$(` <script src="app.bundle.js"></script>\n`).appendTo('body');
}
When no SVG icons are generated, the page embed the 404 page into the current page.
For now, we have to add the following code to works with SVGIcon
<!-- Toolbox svg icons -->
<script type="text/javascript">
window.svgPath = "/{{ directory }}/build/icons/icons.svg";
</script>
The problem is that the code will fetch the given path & it will append the results to the page, even with a non 2xx
response is given .... Then it will append a 404
embed into the current page !
Check the response code before append it into the page.
Use config file (toolbox.json
?) to list the component on toolbox:generate
to optimize the prepare
task.
A styleguide.scss
file should be compiled and imported only on the styleguide (not bundled with the project's assets).
We need this to be able to override styles that our project is redefining or just to brand the styleguide differently.
The deploy
task depends on gulp-gh-pages plugin which it's self depend on module gift
.
The required version of gift
in gulp-gh-pages
have a bug and neeed to be upgraded to the latest version.
Follow:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.