Giter Site home page Giter Site logo

factorial-io / factorial-frontend-stack Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 4.3 MB

Modern frontend tooling with minimal configuration

Home Page: http://factorial-io.github.io/factorial-frontend-stack/

JavaScript 77.22% CSS 9.81% HTML 10.60% Shell 2.37%

factorial-frontend-stack's People

Contributors

andrewbeng89 avatar dependabot[bot] avatar mgrsskls avatar mlnmln avatar simonrdt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

simonrdt

factorial-frontend-stack's Issues

Fix: pattern lab build does not exit

IS

  1. When running yarn run build build CSS, JS and patternlab are build.
  2. But the process idles after > php core/console --generate, but does not exit.

SHOULD
The process should exit.

Investigate lerna versioning mode

IS:
Currently all packages have diferent version numbers

SHOULD:
Alle packages should be released with the same version for compatibility and ease of use.

include() in yaml files not working

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.

eslint config is not correctly exposed to IDEs

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?

Only working with local neutrino install?

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 neutrinofor example works though. Not sure if it is as intended?

Refactor core to allow pick and choosing of features

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?

Document custom entry point

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"
    }
  }
};

neutrino setup doesn't transpile ES6 code as expected.

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;
};

Feat: @factorial/frontend-stack-vue

This new middleware should do the following:

  • Convert .vue files (SFCs) to regular JS & CSS
  • Let the normal core middleware take care of converting JS and CSS

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.

dev mode should provide lint warnings, production mode should produce errors.

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?

Errors when generating patternlab

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:

  • Start the watch process with yarn run neutrino start
  • Change a file that is compiled by babel (JS or CSS)
  • Change a file that is compiled by patternlab (YAML or TWIG)

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.

Default eslint env should be `browser`

IS:
Currently no default env is set. This leads to lint errors (window, document) when migrating existing projects.

SHOULD:
The default evironment should be browser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.