factorial-io / factorial-frontend-stack Goto Github PK
View Code? Open in Web Editor NEWModern frontend tooling with minimal configuration
Home Page: http://factorial-io.github.io/factorial-frontend-stack/
Modern frontend tooling with minimal configuration
Home Page: http://factorial-io.github.io/factorial-frontend-stack/
IS
yarn run build
build CSS, JS and patternlab are build.> php core/console --generate
, but does not exit.SHOULD
The process should exit.
IS:
Currently all packages have diferent version numbers
SHOULD:
Alle packages should be released with the same version for compatibility and ease of use.
Generating SVG sprite map from assets.
Automate parts of the release process through conventional commits and changelog / release generation.
https://github.com/lerna/lerna/tree/master/commands/version#--create-release-type
Tree shaking, HMR, and whatnot ...
For as long as we don't change custom properties at run time, we should not expose CSS custom properties in the build.
SEE
https://github.com/postcss/postcss-custom-properties
BUSINESS VALUE
WARNING
This is a potential breaking change at project level.
There seems to be a problem when using the patternlab --watch
task and using include()
in YAML files.
Already bug reported for this in the data-transform plugin used for this:
aleksip/plugin-data-transform#16
I think for now we have to configure this differently, not using watch task but php core/console --generate
everytime there is a file change.
It is currently not completely transparent for users, when a new build/reload is triggered.
I would be interested if anyone can get the linting working correctly in an IDE.
I tried to add the .eslintrc.js
file as described here.
If I understand what is happening there correctly, this file should export a valid eslint config with all settings that are used in the neutrino middlewares.
I get this error when eslint tries to load the config:
Cannot read config file: /Users/kris/code/fe-stack-test/.eslintrc.js Error: Cannot find module '.neutrinorc.js'
Is this working in atom, vs code or sublime for anyone?
I tried to run this with a global neutrino install (8.3.0) but that doesn´t work.
12:37:56 > yarn start yarn run v1.7.0 $ yarn run neutrino start --use @factorial/frontend-stack-core error Command "neutrino" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Adding neutrino locally with yarn add neutrino
for example works though. Not sure if it is as intended?
UC:
The glob|path to test files should be configurable.
Task:
Verify that this is possible and provide an example how to do it.
While working on the svg-sprite-loader middleware I noticed that when not including the core package, a lot of basic configuration is not happening like the entry points etc.
This means that core
is a dependency that is always needed and for example the new svg-sprite-loader can not work without it.
My idea is to structure the packages in a way where we have a very basic setup
packag, that just configures webpack in terms of source, public folder, entry points etc.
Additionally we would have a bunch of packages for CSS conversion, JS conversion, svg-spritemap generation, font loading, image loading, dev-server, (...). Those can then be added to a project as needed.
Thoughts?
https://github.com/sap9433/filewatcher-webpack-plugin/issues
It appears to be only a wrapper on top of
Could be good documenting how we can set a custom "entry point" instead of ./src/index.js.
Maybe we could add in the Readme something like this:
Add in the .neutrinorc.js this code if our entry point is ./source/index.js:
module.exports = {
use: [
"@factorial/frontend-stack-core"
],
options: {
source: "source",
output: "source/build", // NB: The whole build needs to be under version control currently.
mains: {
index: "index.js"
}
}
};
When passing multiple entry points to mains, they should be respected.
SEE:
https://neutrinojs.org/customization/#optionsmains
https://github.com/factorial-io/factorial-frontend-stack/blob/master/packages/core/index.js#L79
When using ES6 (e.g. arrow functions or new keywords such as let or const) in your codebase and doing yarn run neutrino start
, the ES6 code is not getting transpiled to ES5.
I've used this snippet to test.
const test = () => {
let a = 2;
a = 3;
return a;
};
UC:
We need different path settings for our build on local and remote for historic reasons.
IS
hardcoded in CONSTANT at https://github.com/factorial-io/factorial-frontend-stack/blob/master/packages/pattern-lab/index.js#L8
SHOULD:
this should be configurable.
Configure eslint to enforce jsdoc comment blocks before methods and functions.
We should consider creating a template so projects can be scaffolded with yarn create
.
https://neutrinojs.org/installation/create-new-project.html#scaffold-a-neutrino-project
Extend configuration with a middleware that exports css variables, so we can import or display them in pattern lab.
SEE:
https://github.com/nahody/postcss-export-vars
https://github.com/factorial-io/factorial-frontend-stack/blob/master/packages/core/index.js#L140
Some users have problems requiring Babel as external module. This slows down the build process. See discussion at https://markgoodyear.com/2015/06/using-es6-with-gulp/
Documentation here appears to be outdated now that we don't need to run the PHP server in parallel anymore.
http://factorial-io.github.io/factorial-frontend-stack/packages/pattern-lab.html#features
cc @krisimmig
It makes for a better developer experience …
Breaks when upgrading from 13.1.0. to 14.0.0.
This new middleware should do the following:
Result:
We can add .vue files into our patternlab workflow and use vue by just adding a new middleware to the neutrino stack if necessary.
I am not sure how the linting rules are implemented here, there is no .eslint
file that tells the IDE how to lint the JS files.
Linting on save is working strangely as well I think. When I start with yarn start
and have linting errors, it stops the task completely until I fix all errors. Than, with no errors I can start the task again and it keeps running. But when I than reintroduce the same errors, there is no linting error and the build completes successfully.
So at the moment the only way I can see if I have linting errors or warnings is by restarting the build process with yarn start
.
Maybe I have something configured wrong?
SHOULD:
*.test.js
and *.spec.js
.There are still errors when generating patternlab witht he new filewathcer plugin and php core/console --generate
in the frontend-stack-pattern-lab package.
To reproduce:
yarn run neutrino start
Result:
The patternlab generate commands runs twice and errors the second time because of unremovable/unlinkable files.
Should be:
php core/console --generate
only runs once on file change.
IS
Currently only inline source maps are build in dev mode.
SHOULD
External source maps should be build when running in production mode.
SHOULD:
SEE:
UC:
We have an existing project based on our gulp based frontend stack and want to migrate it to the new neutrino version.
style minification through @neutrinojs/style-minify
and external source maps appear to be conflicting
use the engine dependency in package.json.
stylelint-disable
comments. stylelint/stylelint#874IS:
Currently no default env is set. This leads to lint errors (window, document) when migrating existing projects.
SHOULD:
The default evironment should be browser
.
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.