From 7a82eca67cc54e66edbe7d3e403354d8649bd8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 11 Sep 2019 15:51:28 +0200 Subject: [PATCH 1/5] Update Prettier --- package.json | 2 +- yarn.lock | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a7d202c..95170a3 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "flow-bin": "^0.64.0", "jest": "^23.6.0", "jest-in-case": "^1.0.2", - "prettier": "^1.10.2", + "prettier": "1.18.2", "react": "^16.2.0", "react-dom": "^16.2.0", "typescript": "^2.6.1", diff --git a/yarn.lock b/yarn.lock index 9b23dca..cdd4622 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7730,10 +7730,10 @@ preserve@^0.2.0: resolved "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier@^1.10.2, prettier@^1.14.3: - version "1.16.4" - resolved "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz#73e37e73e018ad2db9c76742e2647e21790c9717" - integrity sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g== +prettier@1.18.2, prettier@^1.14.3: + version "1.18.2" + resolved "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" + integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== pretty-error@^2.0.2: version "2.1.1" @@ -8217,11 +8217,6 @@ regenerator-runtime@^0.11.0: resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== -regenerator-runtime@^0.12.0: - version "0.12.1" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" - integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== - regenerator-runtime@^0.13.2: version "0.13.2" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" From 7184f8f5579893a0f6b94b861857a36137442670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 11 Sep 2019 15:37:33 +0200 Subject: [PATCH 2/5] Update Prettier config --- .prettierrc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.prettierrc.js b/.prettierrc.js index de2f53c..f0b4ed2 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,6 @@ module.exports = { + endOfLine: 'lf', + proseWrap: 'always', singleQuote: true, - trailingComma: 'all', + trailingComma: 'es5', }; From f839285c626f8d81b5e620f151f94d1d2186c458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 11 Sep 2019 15:53:10 +0200 Subject: [PATCH 3/5] Run Prettier on whole codebase --- .all-contributorsrc | 3 +- .changeset/README.md | 37 ++-- .changeset/config.js | 8 +- .travis.yml | 2 +- CODE_OF_CONDUCT.md | 26 +-- CONTRIBUTING.md | 69 +++++--- FUTURE.md | 74 ++++---- MINUTIAE.md | 17 +- README.md | 41 +++-- fixtures/importResolution/css/A.css | 4 +- fixtures/importResolution/scss/A.scss | 4 +- fixtures/importResolution/scss/B.scss | 4 +- fixtures/importResolution/ts/A.ts | 2 +- fixtures/importResolution/ts/B.ts | 2 +- fixtures/importResolution/vue/A.vue | 43 ++--- fixtures/importResolution/vue/B.vue | 22 +-- fixtures/simpleVue.vue | 4 +- flow-typed/npm/jest_v22.x.x.js | 28 ++-- packages/bitbucket-codesandboxer/CHANGELOG.md | 10 +- .../bitbucket-codesandboxer/bookmarklet.js | 6 +- .../src/pages/deploy-file/index.html | 2 +- .../src/pages/deploy-file/index.js | 10 +- .../src/pages/deploy-file/loading.css | 12 +- .../src/pages/home/index.html | 27 ++- .../src/pages/select-file/index.html | 2 +- .../src/pages/select-file/index.js | 4 +- .../src/utils/bitbucket.js | 2 +- packages/codesandboxer-fs/CHANGELOG.md | 65 ++++--- packages/codesandboxer-fs/README.md | 36 +++- .../codesandboxer-fs/src/assembleFiles.js | 8 +- .../src/assembleFilesAndPost.js | 2 +- packages/codesandboxer-fs/src/cli.js | 16 +- packages/codesandboxer-fs/src/fs.test.js | 4 +- packages/codesandboxer-fs/src/loadFiles.js | 8 +- .../codesandboxer-fs/src/loadRelativeFile.js | 4 +- packages/codesandboxer/CHANGELOG.md | 77 ++++++--- packages/codesandboxer/README.md | 158 +++++++++++++----- packages/codesandboxer/src/constants.js | 2 +- .../src/fetchFiles/ensureExample.js | 6 +- .../fetchFiles/ensureExtensionAndTemplate.js | 2 +- .../src/fetchFiles/ensurePkgJSON.js | 6 +- .../src/fetchFiles/fetchFiles.test.js | 4 +- .../fetchFiles/fetchInternalDependencies.js | 14 +- .../codesandboxer/src/fetchFiles/index.js | 6 +- .../fetchRelativeFile.test.js | 6 +- .../src/fetchRelativeFile/getUrl.js | 2 +- .../src/fetchRelativeFile/index.js | 14 +- .../codesandboxer/src/finaliseCSB/index.js | 2 +- .../codesandboxer/src/parseFile/parseDeps.js | 2 +- .../codesandboxer/src/parseFile/parseFile.js | 2 +- .../src/parseFile/parseFile.test.js | 4 +- .../src/parseFile/parseScssfile.js | 6 +- .../src/parseFile/parseScssfile.test.js | 4 +- .../src/replaceImports/replaceImports.test.js | 2 +- .../codesandboxer/src/sendFilesToCSB/index.js | 2 +- .../src/templates/packagejson.js | 2 +- .../src/utils/absolutesToRelative.js | 2 +- .../src/utils/getRegexMatchStr.js | 4 +- .../codesandboxer/src/utils/replaceImport.js | 2 +- .../codesandboxer/src/utils/resolvePath.js | 2 +- .../codesandboxer/src/utils/utils.test.js | 16 +- packages/react-codesandboxer/CHANGELOG.md | 74 +++++--- packages/react-codesandboxer/README.md | 128 ++++++++++---- .../react-codesandboxer/src/CodeSandboxer.js | 8 +- packages/vs-codesandboxer/CHANGELOG.md | 12 +- packages/vs-codesandboxer/README.md | 20 ++- packages/vs-codesandboxer/extension.js | 6 +- .../vsc-extension-quickstart.md | 59 ++++--- 68 files changed, 797 insertions(+), 467 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 8b1e947..8138af2 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -88,7 +88,8 @@ "avatar_url": "https://avatars3.githubusercontent.com/u/6643991?v=4", "profile": "https://michaeldeboey.be", "contributions": [ - "maintenance" + "maintenance", + "tool" ] } ], diff --git a/.changeset/README.md b/.changeset/README.md index 17f737f..b82bb55 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -1,36 +1,53 @@ # Changesets -Hello and welcome! This folder has been automatically generated by `@atlaskit/build-releases`, a build tool that works with `bolt` to help you release components from a mono-repository. You can find the full documentation for it [here](https://www.npmjs.com/package/@atlaskit/build-releases) +Hello and welcome! This folder has been automatically generated by +`@atlaskit/build-releases`, a build tool that works with `bolt` to help you +release components from a mono-repository. You can find the full documentation +for it [here](https://www.npmjs.com/package/@atlaskit/build-releases) -To help you get started though, here are some things you should know about this folder: +To help you get started though, here are some things you should know about this +folder: ## Changesets are automatically generated -Changesets are generated by the `build-releases changeset` command, though it may have been given a new name within your repository. As long as you are following a changeset release flow, you shouldn't have any problems. +Changesets are generated by the `build-releases changeset` command, though it +may have been given a new name within your repository. As long as you are +following a changeset release flow, you shouldn't have any problems. ## Each changeset is its own folder -We use hashes by default for these folder names to avoid collisions when generating them, but there's no harm that will come from renaming them. +We use hashes by default for these folder names to avoid collisions when +generating them, but there's no harm that will come from renaming them. ## Changesets are automatically removed -When `build-releases version` or equivalent command is run, all the changeset folders are removed. This is so we only ever use a changeset once. This makes this a very bad place to store any other information. +When `build-releases version` or equivalent command is run, all the changeset +folders are removed. This is so we only ever use a changeset once. This makes +this a very bad place to store any other information. ## Changesets come in two parts You should treat these parts quite differently: -- `changes.md` is a file you should feel free to edit as much as you want. It will be prepended to your changelog when you next run your version command. -- `changes.json` is a file that includes information about releases, what should be versioned by the version command. We strongly recommend against editing this directly, as you may make a new changeset that puts your bolt repository into an invalid state. +- `changes.md` is a file you should feel free to edit as much as you want. It + will be prepended to your changelog when you next run your version command. +- `changes.json` is a file that includes information about releases, what should + be versioned by the version command. We strongly recommend against editing + this directly, as you may make a new changeset that puts your bolt repository + into an invalid state. ## I want to edit the information in a `changes.json` - how do I do it safely? -The best option is to make a new changeset using the changeset command, copy over the `changes.md`, then delete the old changeset. +The best option is to make a new changeset using the changeset command, copy +over the `changes.md`, then delete the old changeset. ## Can I rename the folder for my changeset? -Absolutely! We need unique hashes to make changesets play nicely with git, but changing your folder from our hash to your own name isn't going to cause any problems. +Absolutely! We need unique hashes to make changesets play nicely with git, but +changing your folder from our hash to your own name isn't going to cause any +problems. ## Can I manually delete changesets? -You can, but you should be aware this will remove the intent to release communicated by the changeset, and should be done with caution. \ No newline at end of file +You can, but you should be aware this will remove the intent to release +communicated by the changeset, and should be done with caution. diff --git a/.changeset/config.js b/.changeset/config.js index 0cecdc5..415e70e 100644 --- a/.changeset/config.js +++ b/.changeset/config.js @@ -35,7 +35,7 @@ const getReleaseLine = async (changeset, versionType) => { .join('\n'); return `- [${versionType}] [${changeset.commit}](${getLink( - changeset.commit, + changeset.commit )}):\n${indentedSummary}`; }; @@ -54,12 +54,12 @@ const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => { const changesetLinks = changesets.map( changeset => `- Updated dependencies [${changeset.commit}](${getLink( - changeset.commit, - )}):`, + changeset.commit + )}):` ); const updatedDepenenciesList = dependenciesUpdated.map( - dependency => ` - ${dependency.name}@${dependency.version}`, + dependency => ` - ${dependency.name}@${dependency.version}` ); return [...changesetLinks, ...updatedDepenenciesList].join('\n'); diff --git a/.travis.yml b/.travis.yml index f24c298..fc6d5ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ script: - yarn lint cache: yarn node_js: - - "node" + - 'node' diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index dec27a2..9866a56 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -5,9 +5,9 @@ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. +size, disability, ethnicity, sex characteristics, gender identity and +expression, level of experience, education, socio-economic status, nationality, +personal appearance, race, religion, or sexual identity and orientation. ## Our Standards @@ -37,11 +37,11 @@ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. ## Scope @@ -58,8 +58,9 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at code-of-conduct@codesandbox.io. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. +obligated to maintain confidentiality with regard to the reporter of an +incident. Further details of specific enforcement policies may be posted +separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other @@ -67,8 +68,9 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5772d8a..1b86e0f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,23 +2,32 @@ Thanks for considering contributing! -This project has been developed to serve use-cases that I have encountered with uploading files to codesandbox, and definitely doesn't cover all use-cases. I'd be happy though if you find something else you need for you to contribute a pull request. I'll make sure you get a review quickly. +This project has been developed to serve use-cases that I have encountered with +uploading files to codesandbox, and definitely doesn't cover all use-cases. I'd +be happy though if you find something else you need for you to contribute a pull +request. I'll make sure you get a review quickly. -If you're not confident raising a pull request, open an issue, and I can talk to you about the feature/bug fix you're looking for, and hopefully we can work out how to do it. +If you're not confident raising a pull request, open an issue, and I can talk to +you about the feature/bug fix you're looking for, and hopefully we can work out +how to do it. ## For issues -If you are reporting a bug, an attempt to understand where in our code the bug comes from, or an easy way to reproduce it is greatly appreciated! +If you are reporting a bug, an attempt to understand where in our code the bug +comes from, or an easy way to reproduce it is greatly appreciated! -If you are requesting a feature, please make sure your use-case for the feature is clearly stated, so it's easy to evaluate. +If you are requesting a feature, please make sure your use-case for the feature +is clearly stated, so it's easy to evaluate. ## Deving on this project -There are a couple of things that are probably good to know(TM) to dev on this project. +There are a couple of things that are probably good to know(TM) to dev on this +project. ### How do I get up and running? -We are using [bolt](https://github.com/boltpkg/bolt) to manage this monorepo. If you haven't worked on a bolt project, the quick get-up-and-running steps are: +We are using [bolt](https://github.com/boltpkg/bolt) to manage this monorepo. If +you haven't worked on a bolt project, the quick get-up-and-running steps are: ```sh yarn global add bolt @@ -30,17 +39,20 @@ The `bolt` command will install npm packages and link them. ### Observing changes -If you are trying to observe changes across linked packages, you will need to make sure they are built. +If you are trying to observe changes across linked packages, you will need to +make sure they are built. -`yarn build` builds all packages. -`yarn dev:csb` runs the build script for `codesandboxer` and watches it for changes. -`yarn dev:rcsb` runs the build script for `react-codesandboxer` and watches it for changes. +`yarn build` builds all packages. `yarn dev:csb` runs the build script for +`codesandboxer` and watches it for changes. `yarn dev:rcsb` runs the build +script for `react-codesandboxer` and watches it for changes. The other packages do not need to be built. ### Validating changes -Currently validation that things work is mostly being done through tests. The most important tests being the ones in `codesandboxer` and `codesandboxer-fs` which use the `/fixtures` directory to validate how they parse and load files. +Currently validation that things work is mostly being done through tests. The +most important tests being the ones in `codesandboxer` and `codesandboxer-fs` +which use the `/fixtures` directory to validate how they parse and load files. ## Adding Templates @@ -50,27 +62,44 @@ Codesandboxer currently supports: - create-react-app-typescript - vue-cli -It should be easy to add new templates. Here are the places you would need to modify: +It should be easy to add new templates. Here are the places you would need to +modify: -1. Add a template file to `packages/codesandboxer/templates/`. - A template should include a main file that imports from `example.js` (or the relevant filetype), as well as any other necessary files to run the sandbox. - 1a. Once you have your template file, export it from `packages/codesandboxer/templates/index.js` added to the object with the name of the sandbox it is for. -2. If you want a different template to be used for `codesandboxer-fs` add a template to `packages/codesandboxer-fs/templates` in the same way. (we tend to make templates for codesandboxer-fs call out the use of the sandboxer more explicitly, as it may be less clear how to debug it) +1. Add a template file to `packages/codesandboxer/templates/`. A template should + include a main file that imports from `example.js` (or the relevant + filetype), as well as any other necessary files to run the sandbox. 1a. Once + you have your template file, export it from + `packages/codesandboxer/templates/index.js` added to the object with the name + of the sandbox it is for. +2. If you want a different template to be used for `codesandboxer-fs` add a + template to `packages/codesandboxer-fs/templates` in the same way. (we tend + to make templates for codesandboxer-fs call out the use of the sandboxer more + explicitly, as it may be less clear how to debug it) ## For Pull Requests ### Code Standards -We're using flow to help keep our code neat. If you could add types to your code, that would be 😎. Code that adds tests for its use-cases is also great. +We're using flow to help keep our code neat. If you could add types to your +code, that would be 😎. Code that adds tests for its use-cases is also great. ### Documentation -If you add anything to the API, please update the documentation as well. (we also accept docs PRs if you see a way to improve our documentation) +If you add anything to the API, please update the documentation as well. (we +also accept docs PRs if you see a way to improve our documentation) ### Monitoring changes -We are using [build-releases](https://www.npmjs.com/package/@atlaskit/build-releases) to add intents to change, so we can make sure our packages are released at the right semantic version. The simple answer is run `yarn changeset` and answer the questions. If you're not certain about semantic versioning, I would recommend checking out [this documentation](https://docs.npmjs.com/about-semantic-versioning). +We are using +[build-releases](https://www.npmjs.com/package/@atlaskit/build-releases) to add +intents to change, so we can make sure our packages are released at the right +semantic version. The simple answer is run `yarn changeset` and answer the +questions. If you're not certain about semantic versioning, I would recommend +checking out +[this documentation](https://docs.npmjs.com/about-semantic-versioning). ## Please Be Nice -I'm currently working on a code of conduct, but until that's ready, I wanted to make sure that everyone felt welcome here. If you are looking to contribute, please make sure you are respectful to anyone participating on this project. \ No newline at end of file +I'm currently working on a code of conduct, but until that's ready, I wanted to +make sure that everyone felt welcome here. If you are looking to contribute, +please make sure you are respectful to anyone participating on this project. diff --git a/FUTURE.md b/FUTURE.md index 45f14a4..856d01c 100644 --- a/FUTURE.md +++ b/FUTURE.md @@ -2,22 +2,29 @@ - [ ] Be super careful to catch all errors - [x] Rewrite readme to focus on use-cases and explaining how to implement them. -- [x] Look into supporting non-`create-react-app` uploads (Having to parse non-js files will need to be a part of this) -- [ ] With `codesandboxer`, refactor the shape of it. Take in a single object as argument, to make it easier to pass things around, and so we stop having the problem of ever-expanding functions. Move more properties into a generic `config` object -- [x] Add error boundaries around the loaded example component, to allow a better debugging experience when something goes wrong. +- [x] Look into supporting non-`create-react-app` uploads (Having to parse + non-js files will need to be a part of this) +- [ ] With `codesandboxer`, refactor the shape of it. Take in a single object as + argument, to make it easier to pass things around, and so we stop having + the problem of ever-expanding functions. Move more properties into a + generic `config` object +- [x] Add error boundaries around the loaded example component, to allow a + better debugging experience when something goes wrong. ## New packages to build -- [ ] `codesandboxer-loader` - use `codesandboxer-fs` to create the data object to be sent to codesandbox -- [ ] `gatsby-plugin-codesandboxer` - +- [ ] `codesandboxer-loader` - use `codesandboxer-fs` to create the data object + to be sent to codesandbox +- [ ] `gatsby-plugin-codesandboxer` - ## Supporting other sandbox types -We currently support react and react-typescript sandboxes -If you pass in the `template` string, you can change your sandbox kind. +We currently support react and react-typescript sandboxes If you pass in the +`template` string, you can change your sandbox kind. ## Notes made on change alongside LBatch: +``` fetchRelativePkgJSON(componentFile) compositData(entryFile, componentFile, gitConfig) @@ -29,8 +36,6 @@ fetchRelativePkgJSON(examplePath) from componentFile, fetch pkgJSON using pkgUp fetch entryFile and its dependents - - config = { gitConfig: {} | fs, pkgJSON?: {} | Promise({}), // if no pkgJSON is given, pkgUp to a pkgJSON, @@ -48,11 +53,12 @@ const parsedFile = { internalDependencies: [], extternalDependencies: {}, } - ``` + +```js const rc = findRC() -const pkgJSON = ensureProjectPkgJSON({ config.pkgJSON, rc.pkgJSON, //pkgUp.pkgJSON }) -const parsedEntryFile = ensureEntryFile({ config.entryFile, rc.entryFile, //defaultedEntryFileContents }) +const pkgJSON = ensureProjectPkgJSON({ config.pkgJSON, rc.pkgJSON /*, pkgUp.pkgJSON*/ }) +const parsedEntryFile = ensureEntryFile({ config.entryFile, rc.entryFile /*, defaultedEntryFileContents*/ }) const parsedExampleFile = getExampleFile(examplePath) const files = { @@ -60,39 +66,41 @@ const files = { 'codesandboxerEntry.js': { content: parsedEntryFile.contents }, } -return await assembleAllFilesAndDeps(files, { +return assembleAllFilesAndDeps(files, { ...parsedEntryFile.externalDeps, ...parsedExampleFile.externalDeps }, [ // ...parsedEntryFile.internalDeps, - ...parsedExampleFile.internalDeps + ...parsedExampleFile.internalDeps, ], pkgJSON, config) ``` +``` // entryFiles cannot have internalDeps import './styles.css' import whatever from './example' - +``` --- +```js files = { - 'path/to/somewhere.js': { content: '/* the file contents */' } -} + 'path/to/somewhere.js': { content: '/* the file contents */' }, +}; deps = { - package: '^1.1.0' -} + package: '^1.1.0', +}; +``` --- - -createParamsConfig = { - name -} +``` +createParamsConfig = { name } createParameters(files, externalDependencies, initialPKGJSON config ????) - ``` + +```js const sentPKGJSON = generatePkgJSON(externalDependencies, config) // ensures all packages have react and react-dom files['package.json'] = sentPKGJSON; files['index.html'] =
\ No newline at end of file + diff --git a/fixtures/importResolution/vue/B.vue b/fixtures/importResolution/vue/B.vue index 9c20654..6645b5f 100644 --- a/fixtures/importResolution/vue/B.vue +++ b/fixtures/importResolution/vue/B.vue @@ -1,10 +1,5 @@