-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
86 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"presets": ["@babel/env", "@babel/preset-react"] | ||
} | ||
"presets": ["@babel/env", "@babel/preset-react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
module.exports = { | ||
"stories": [ | ||
stories: [ | ||
"../packages/**/*.stories.mdx", | ||
"../packages/**/*.stories.@(js|jsx|ts|tsx)" | ||
"../packages/**/*.stories.@(js|jsx|ts|tsx)", | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials" | ||
] | ||
} | ||
addons: ["@storybook/addon-links", "@storybook/addon-essentials"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# spm-ui-components | ||
|
||
## Contributing In General | ||
Contributions are not supported at the moment. | ||
|
||
Contributions are not supported at the moment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# UI Addon Development Environment | ||
|
||
A collection of front-end tools and libraries that can be used to extend UIM with JavaScript components. It enables rapid development of SPM custom application pages based on the IBM Carbon Design System. | ||
A collection of front-end tools and libraries that can be used to extend UIM with JavaScript components. It enables rapid development of SPM custom application pages based on the IBM Carbon Design System. | ||
|
||
The documentation is available at this URL: [https://merative.github.io/spm-ui-addon-devenv/](https://merative.github.io/spm-ui-addon-devenv/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,83 @@ | ||
const path = require("path"); | ||
const webpack = require('webpack'); | ||
const ReactDevToolsIFramePlugin = require('react-dev-tools-iframe-webpack-plugin'); | ||
const webpack = require("webpack"); | ||
const ReactDevToolsIFramePlugin = require("react-dev-tools-iframe-webpack-plugin"); | ||
|
||
module.exports = { | ||
entry: ['./public-path.js', "./packages/carbon-addons-devenv/src/index.js"], | ||
entry: ["./public-path.js", "./packages/carbon-addons-devenv/src/index.js"], | ||
mode: "development", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss$/, | ||
loaders: [ | ||
'style-loader', | ||
'css-loader', | ||
"style-loader", | ||
"css-loader", | ||
{ | ||
loader: "sass-loader", | ||
options: { | ||
sassOptions: { | ||
includePaths: [ "node_modules" ] | ||
includePaths: ["node_modules"], | ||
}, | ||
}, | ||
}, | ||
], | ||
include: path.resolve(__dirname, './packages/custom-carbon-addons/src/scss'), | ||
include: path.resolve( | ||
__dirname, | ||
"./packages/custom-carbon-addons/src/scss", | ||
), | ||
}, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /(bower_components)/, | ||
loader: "babel-loader", | ||
options: { presets: ["@babel/env"] } | ||
options: { presets: ["@babel/env"] }, | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: ["style-loader", "css-loader"] | ||
use: ["style-loader", "css-loader"], | ||
}, | ||
{ | ||
test: /\.(gif|png|jpe?g|svg)$/i, | ||
loader: 'file-loader', | ||
loader: "file-loader", | ||
}, | ||
{ | ||
test: /\.(png|woff|woff2|eot|ttf|svg)$/, | ||
loader: 'url-loader?limit=100000' | ||
loader: "url-loader?limit=100000", | ||
}, | ||
] | ||
], | ||
}, | ||
plugins: [ | ||
new webpack.EnvironmentPlugin(['RELATIVE_PATH_TO_BUNDLE', 'GRAPHQL_SERVER_URL', 'CUSTOM_COMPONENT_NAME', 'CSRF_TOKEN_REQUEST_HEADER', 'CSRF_TOKEN_ENPOINT']),new ReactDevToolsIFramePlugin() | ||
new webpack.EnvironmentPlugin([ | ||
"RELATIVE_PATH_TO_BUNDLE", | ||
"GRAPHQL_SERVER_URL", | ||
"CUSTOM_COMPONENT_NAME", | ||
"CSRF_TOKEN_REQUEST_HEADER", | ||
"CSRF_TOKEN_ENPOINT", | ||
]), | ||
new ReactDevToolsIFramePlugin(), | ||
], | ||
resolve: { extensions: ["*", ".js", ".jsx"], | ||
resolve: { | ||
extensions: ["*", ".js", ".jsx"], | ||
alias: { | ||
devenv_pkg: path.resolve('./packages/carbon-addons-devenv') | ||
} | ||
devenv_pkg: path.resolve("./packages/carbon-addons-devenv"), | ||
}, | ||
}, | ||
output: { | ||
path: path.resolve(__dirname, "dist/"), | ||
library: 'spmcustom', | ||
libraryExport: 'default', | ||
library: "spmcustom", | ||
libraryExport: "default", | ||
publicPath: "/dist/", | ||
filename: "spm-custom-carbon-addons-[name].bundle.js", | ||
chunkFilename: 'spm-custom-carbon-addons-[name].chunk.js', | ||
chunkFilename: "spm-custom-carbon-addons-[name].chunk.js", | ||
}, | ||
watchOptions: { | ||
poll: 400, | ||
ignored: '**/node_modules', | ||
ignored: "**/node_modules", | ||
}, | ||
devServer: { | ||
contentBase: path.join(__dirname, "public/"), | ||
port: 3000, | ||
publicPath: "http://localhost:3000/dist/", | ||
hotOnly: false | ||
} | ||
}; | ||
hotOnly: false, | ||
}, | ||
}; |