-
Notifications
You must be signed in to change notification settings - Fork 859
docs: clarify yarn install purpose in README #4629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2cb6c6a
0e3346b
782646e
a617525
bd385ab
f875638
1b2afdd
49fe452
6567585
df01bd7
08ac4d9
c2d8c5f
8506af9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,12 @@ | ||
| TEST | ||
|
|
||
| # Carbon Design System | ||
|
|
||
|  | ||
|
|
||
| This is the [Carbon Design System website](http://www.carbondesignsystem.com). | ||
| It's built using the | ||
| [gatsby-theme-carbon](https://gatsby.carbondesignsystem.com/) with | ||
| [GatsbyJS](https://www.gatsbyjs.org/). | ||
| This is the [Carbon Design System website](http://www.carbondesignsystem.com). | ||
| It's built using the [gatsby-theme-carbon](https://gatsby.carbondesignsystem.com/) with [GatsbyJS](https://www.gatsbyjs.org/). | ||
|
|
||
| ## 📂 Structure | ||
|
|
||
| ``` | ||
| src | ||
| ├── components | ||
| ├── data | ||
|
|
@@ -20,31 +15,25 @@ src | |
| ├── pages | ||
| ├── styles | ||
| ├── util | ||
| ``` | ||
|
|
||
|
|
||
| ## 👩💻 Develop | ||
|
|
||
| - 🤝 [Contribution guidelines](.github/CONTRIBUTING.md) | ||
| - 📚 | ||
| [Content and Markdown guidelines](https://gatsby-theme-carbon.now.sh/components/markdown) | ||
| - 🗺 | ||
| [Navigation guidelines](https://gatsby-theme-carbon.now.sh/guides/navigation/sidebar) | ||
| - 📚 [Content and Markdown guidelines](https://gatsby-theme-carbon.now.sh/components/markdown) | ||
| - 🗺 [Navigation guidelines](https://gatsby-theme-carbon.now.sh/guides/navigation/sidebar) | ||
|
|
||
| - `yarn install` – install dependencies | ||
| - `yarn install` – installs all project dependencies listed in `package.json` | ||
| - `yarn dev` – start the development server | ||
| - `yarn dev:clean` – use this if you have cache issues | ||
| - `lint:js` – lint your JavaScript files | ||
| - `format` - run Prettier | ||
| - `format` – run Prettier | ||
|
|
||
| If you need more detailed information on how to set up your machine to develop | ||
| locally, please take a look at our | ||
| [wiki](https://github.com/carbon-design-system/carbon-website/wiki). | ||
Subham-KRLX marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| If you need more detailed information on how to set up your machine to develop locally, please take a look at our [wiki](https://github.com/carbon-design-system/carbon-website/wiki). | ||
|
|
||
| ## 🚀 Build | ||
|
|
||
| Running the build command generates all the files and places them in the | ||
| `public` folder. | ||
| Running the build command generates all the files and places them in the `public` folder. | ||
|
|
||
| ``` | ||
| yarn build | ||
| ``` | ||
|
Comment on lines
-48
to
-50
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why remove code formatting for this? |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,4 +74,4 @@ module.exports = { | |
| }, | ||
| }, | ||
| ], | ||
| }; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,6 @@ | ||
| const path = require('path'); | ||
|
|
||
| exports.onCreateWebpackConfig = ({ actions, getConfig }) => { | ||
| // Allows importing html files for component code examples | ||
| actions.setWebpackConfig({ | ||
| module: { | ||
| rules: [ | ||
|
|
@@ -19,15 +18,25 @@ exports.onCreateWebpackConfig = ({ actions, getConfig }) => { | |
| ], | ||
| }, | ||
| resolve: { | ||
| // Ensure node_modules are in the path for resolution | ||
| modules: [path.resolve(__dirname, 'src'), 'node_modules'], | ||
| alias: { | ||
| // light-weight fork of buble compiler from react-live team | ||
| buble: path.resolve(__dirname, 'node_modules', '@philpl/buble'), | ||
| // Explicitly resolve @carbon packages to their node_modules path | ||
| '@carbon/react': path.resolve(__dirname, 'node_modules/@carbon/react'), | ||
| '@carbon/icons-react': path.resolve(__dirname, 'node_modules/@carbon/icons-react'), | ||
| '@carbon/styles': path.resolve(__dirname, 'node_modules/@carbon/styles'), // Keep for Sass if needed | ||
| }, | ||
| // Fallback for older module resolution patterns | ||
| fallback: { | ||
| 'crypto': false, // Example of adding fallbacks if needed for older modules | ||
| 'stream': false, | ||
| 'path': require.resolve('path-browserify'), // Ensure path resolves correctly | ||
| // You might need more if other 'cannot resolve' errors appear for node built-ins | ||
| } | ||
|
Comment on lines
+25
to
+36
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this for? |
||
| }, | ||
| }); | ||
|
|
||
| // Disable sourcemaps in production | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imo this is valuable as |
||
| if (getConfig().mode === 'production') { | ||
| actions.setWebpackConfig({ | ||
| devtool: false, | ||
|
|
@@ -38,7 +47,6 @@ exports.onCreateWebpackConfig = ({ actions, getConfig }) => { | |
| exports.createPages = ({ actions }) => { | ||
| const { createRedirect } = actions; | ||
|
|
||
| // Community index | ||
| createRedirect({ | ||
| fromPath: '/community/components', | ||
| toPath: '/community/component-index', | ||
|
|
@@ -50,7 +58,6 @@ exports.createPages = ({ actions }) => { | |
| isPermanent: true, | ||
| }); | ||
|
|
||
| // Developing | ||
| createRedirect({ | ||
| fromPath: '/resources', | ||
| toPath: '/developing/developer-resources', | ||
|
|
@@ -97,7 +104,6 @@ exports.createPages = ({ actions }) => { | |
| isPermanent: true, | ||
| }); | ||
|
|
||
| // Case studies | ||
| createRedirect({ | ||
| fromPath: ' /case-studies/overview', | ||
| toPath: '/all-about-carbon/who-uses-carbon/', | ||
|
|
@@ -114,7 +120,6 @@ exports.createPages = ({ actions }) => { | |
| isPermanent: true, | ||
| }); | ||
|
|
||
| // Data-visualization | ||
| createRedirect({ | ||
| fromPath: '/data-visualization/basic-charts', | ||
| toPath: '/data-visualization/simple-charts', | ||
|
|
@@ -126,7 +131,6 @@ exports.createPages = ({ actions }) => { | |
| isPermanent: true, | ||
| }); | ||
|
|
||
| // Elements L0 - 2022/02 | ||
| createRedirect({ | ||
| fromPath: '/guidelines/2x-grid/overview', | ||
| toPath: '/elements/2x-grid/overview', | ||
|
|
@@ -247,4 +251,4 @@ exports.createPages = ({ actions }) => { | |
| toPath: '/elements/typography/code', | ||
| isPermanent: true, | ||
| }); | ||
| }; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| import ArticleCard from './ArticleCard'; | ||
|
|
||
| export default ArticleCard; | ||
| export default ArticleCard; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing the backtics cause this to not be formatted properly. I'd just leave them in.