Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

WIP CRL v2 #136

Closed
wants to merge 30 commits into from
Closed

WIP CRL v2 #136

wants to merge 30 commits into from

Conversation

transitive-bullshit
Copy link
Owner

@transitive-bullshit transitive-bullshit commented Mar 5, 2019

This branch separates out the core dependencies and build logic into a crl-scripts package in a very similar way that create-react-app uses react-scripts to centralize all logic.

This will make upgrading and maintaining most CRL libraries much easier and give CRL more control over the bundling process so we can push incremental changes more frequently.

The goal is to be able to eject from using crl-scripts in very much the same way that CRA does, but this functionality is currently missing.

This change also updates the example apps to use CRA v2 and is a superset of #134 and #122.

I created one issue for some weird behavior I ran into with CRA v2 and local linking.

cc @paulmelnikow @wuweiweiwu @danielsogl @sag1v @tsiq-swyx would love to hear your guy's thoughts on this direction for CRL v2. Also very much looking for contributors who are interested in helping out with finalizing this PR.

Still TODO:

  • eject functionality
  • update unit tests for v2 changes
  • update docs for v2 changes
  • Just have one template and infer whether the project is using TS or not in crl-scripts similar to how CRA and microbundle work

Fixes #104, #116, #67 (updating the version of rollup), #99, #119,

Thanks!

@karl-run
Copy link

karl-run commented Mar 10, 2019

I gave it a quick test locally. Built with yarn. Windows 10 with git bash shell.

$ node create-react-library/packages/create-react-library/index.js testcrl2
? Package Name testcrl2
? Package Description
? Author's GitHub Handle karl-run
? GitHub Repo Path karl-run/testcrl2
? License MIT
? Package Manager npm
? Template default
× Copying default template to C:\Users\k\git\testcrl2
Error: Lexical error on line 1. Unrecognized text.
  ╔ ╝   ╔   �╔  F
^
    at Parser.parseError (C:\Users\k\git\create-react-library\packages\cre
ate-react-library\node_modules\handlebars\dist\cjs\handlebars\compiler\par
ser.js:267:19)
    at Object.parseError (C:\Users\k\git\create-react-library\packages\cre
ate-react-library\node_modules\handlebars\dist\cjs\handlebars\compiler\par
ser.js:394:36)
    at Object.next (C:\Users\k\git\create-react-library\packages\create-re
act-library\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js
:522:33)
    at Object.lex (C:\Users\k\git\create-react-library\packages\create-rea
ct-library\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:
526:30)
    at lex (C:\Users\k\git\create-react-library\packages\create-react-libr
ary\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:297:36)
    at Parser.parse (C:\Users\k\git\create-react-library\packages\create-r
eact-library\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.j
s:320:34)
    at HandlebarsEnvironment.parse (C:\Users\k\git\create-react-library\pa
ckages\create-react-library\node_modules\handlebars\dist\cjs\handlebars\co
mpiler\base.js:46:43)
    at compileInput (C:\Users\k\git\create-react-library\packages\create-r
eact-library\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler
.js:515:19)
    at ret (C:\Users\k\git\create-react-library\packages\create-react-libr
ary\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:524:1
8)
    at AsyncFunction.module.exports.copyTemplateFile (C:\Users\k\git\creat
e-react-library\packages\create-react-library\lib\create-library.js:89:21)

Maybe you'll find this helpful. :)

@sag1v
Copy link

sag1v commented Mar 17, 2019

Great progress. I hope i'll have time to deep dive on it later on this week

Copy link

@sag1v sag1v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😳

This was referenced Aug 29, 2019
@transitive-bullshit
Copy link
Owner Author

@CarterMcAlister excited to see this get updated -- let me know if you run into any issues 😄

@transitive-bullshit
Copy link
Owner Author

I finally got around to updating CRL and releasing v3.0.0.

This release uses a minor fork of microbundle instead of doing everything ourselves which simplifies the amount of work we'll have to do to maintain CRL as well as libraries created with CRL.

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

Successfully merging this pull request may close these issues.

Extracting scripts to improve maintainability of descendent projects
4 participants