-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib): packages, provide a require resolve
- Loading branch information
Showing
6 changed files
with
268 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Packages lint | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
Documentation: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: npm | ||
- name: Node.js modules cache | ||
uses: actions/cache@v3 | ||
id: modules-cache | ||
with: | ||
path: ${{ github.workspace }}/node_modules | ||
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.node-version }}-modules | ||
- name: Install Node.js packages | ||
if: ${{ steps.modules-cache.outputs.cache-hit != 'true' }} | ||
run: npm install | ||
- name: Build | ||
run: npm run build:packages-lib | ||
- name: Git modified files | ||
if: ${{ success() }} | ||
run: | | ||
echo 'GIT_MODIFIED<<EOF' >> $GITHUB_ENV | ||
git ls-files -m >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- name: Lint | ||
if: ${{ success() }} | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const action = require(`${process.env.GITHUB_WORKSPACE}/scripts/actions.fileDiffs.js`) | ||
const options = { | ||
rexp: /(packages\.js|packagesLicenses\.txt)$/, | ||
message: "Update packages lib with '$ npm run build:packages-lib'" | ||
}; | ||
const { resultsArray, resultsString } = action(process.env.GIT_MODIFIED, options) | ||
if (resultsArray.length) { | ||
core.setFailed(resultsString) | ||
} |
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,86 +1,173 @@ | ||
const babelCoreResolve = require.resolve('@babel/core'); | ||
exports.babelCoreResolve = babelCoreResolve; | ||
|
||
const babelCore = require('@babel/core'); | ||
exports.babelCore = babelCore; | ||
|
||
const babelLoaderResolve = require.resolve('babel-loader'); | ||
exports.babelLoaderResolve = babelLoaderResolve; | ||
|
||
const babelLoader = require('babel-loader'); | ||
exports.babelLoader = babelLoader; | ||
|
||
const copyWebpackPluginResolve = require.resolve('copy-webpack-plugin'); | ||
exports.copyWebpackPluginResolve = copyWebpackPluginResolve; | ||
|
||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
exports.CopyWebpackPlugin = CopyWebpackPlugin; | ||
|
||
const cssLoaderResolve = require.resolve('css-loader'); | ||
exports.cssLoaderResolve = cssLoaderResolve; | ||
|
||
const cssLoader = require('css-loader'); | ||
exports.cssLoader = cssLoader; | ||
|
||
const cssMinimizerWebpackPluginResolve = require.resolve('css-minimizer-webpack-plugin'); | ||
exports.cssMinimizerWebpackPluginResolve = cssMinimizerWebpackPluginResolve; | ||
|
||
const CssMinimizerWebpackPlugin = require('css-minimizer-webpack-plugin'); | ||
exports.CssMinimizerWebpackPlugin = CssMinimizerWebpackPlugin; | ||
|
||
const dotenvResolve = require.resolve('dotenv'); | ||
exports.dotenvResolve = dotenvResolve; | ||
|
||
const dotenv = require('dotenv'); | ||
exports.dotenv = dotenv; | ||
|
||
const dotenvExpandResolve = require.resolve('dotenv-expand'); | ||
exports.dotenvExpandResolve = dotenvExpandResolve; | ||
|
||
const dotenvExpand = require('dotenv-expand'); | ||
exports.dotenvExpand = dotenvExpand; | ||
|
||
const dotenvWebpackResolve = require.resolve('dotenv-webpack'); | ||
exports.dotenvWebpackResolve = dotenvWebpackResolve; | ||
|
||
const dotenvWebpack = require('dotenv-webpack'); | ||
exports.dotenvWebpack = dotenvWebpack; | ||
|
||
const eslintWebpackPluginResolve = require.resolve('eslint-webpack-plugin'); | ||
exports.eslintWebpackPluginResolve = eslintWebpackPluginResolve; | ||
|
||
const EslintWebpackPlugin = require('eslint-webpack-plugin'); | ||
exports.EslintWebpackPlugin = EslintWebpackPlugin; | ||
|
||
const htmlReplaceWebpackPluginResolve = require.resolve('html-replace-webpack-plugin'); | ||
exports.htmlReplaceWebpackPluginResolve = htmlReplaceWebpackPluginResolve; | ||
|
||
const htmlReplaceWebpackPlugin = require('html-replace-webpack-plugin'); | ||
exports.htmlReplaceWebpackPlugin = htmlReplaceWebpackPlugin; | ||
|
||
const htmlWebpackPluginResolve = require.resolve('html-webpack-plugin'); | ||
exports.htmlWebpackPluginResolve = htmlWebpackPluginResolve; | ||
|
||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
exports.HtmlWebpackPlugin = HtmlWebpackPlugin; | ||
|
||
const lessResolve = require.resolve('less'); | ||
exports.lessResolve = lessResolve; | ||
|
||
const less = require('less'); | ||
exports.less = less; | ||
|
||
const lessLoaderResolve = require.resolve('less-loader'); | ||
exports.lessLoaderResolve = lessLoaderResolve; | ||
|
||
const lessLoader = require('less-loader'); | ||
exports.lessLoader = lessLoader; | ||
|
||
const miniCssExtractPluginResolve = require.resolve('mini-css-extract-plugin'); | ||
exports.miniCssExtractPluginResolve = miniCssExtractPluginResolve; | ||
|
||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
exports.MiniCssExtractPlugin = MiniCssExtractPlugin; | ||
|
||
const miniSvgDataUriResolve = require.resolve('mini-svg-data-uri'); | ||
exports.miniSvgDataUriResolve = miniSvgDataUriResolve; | ||
|
||
const miniSvgDataUri = require('mini-svg-data-uri'); | ||
exports.miniSvgDataUri = miniSvgDataUri; | ||
|
||
const rimrafResolve = require.resolve('rimraf'); | ||
exports.rimrafResolve = rimrafResolve; | ||
|
||
const rimraf = require('rimraf'); | ||
exports.rimraf = rimraf; | ||
|
||
const sassResolve = require.resolve('sass'); | ||
exports.sassResolve = sassResolve; | ||
|
||
const sass = require('sass'); | ||
exports.sass = sass; | ||
|
||
const sassLoaderResolve = require.resolve('sass-loader'); | ||
exports.sassLoaderResolve = sassLoaderResolve; | ||
|
||
const sassLoader = require('sass-loader'); | ||
exports.sassLoader = sassLoader; | ||
|
||
const styleLoaderResolve = require.resolve('style-loader'); | ||
exports.styleLoaderResolve = styleLoaderResolve; | ||
|
||
const styleLoader = require('style-loader'); | ||
exports.styleLoader = styleLoader; | ||
|
||
const terserWebpackPluginResolve = require.resolve('terser-webpack-plugin'); | ||
exports.terserWebpackPluginResolve = terserWebpackPluginResolve; | ||
|
||
const TerserWebpackPlugin = require('terser-webpack-plugin'); | ||
exports.TerserWebpackPlugin = TerserWebpackPlugin; | ||
|
||
const tsLoaderResolve = require.resolve('ts-loader'); | ||
exports.tsLoaderResolve = tsLoaderResolve; | ||
|
||
const tsLoader = require('ts-loader'); | ||
exports.tsLoader = tsLoader; | ||
|
||
const tslibResolve = require.resolve('tslib'); | ||
exports.tslibResolve = tslibResolve; | ||
|
||
const tslib = require('tslib'); | ||
exports.tslib = tslib; | ||
|
||
const typescriptResolve = require.resolve('typescript'); | ||
exports.typescriptResolve = typescriptResolve; | ||
|
||
const typescript = require('typescript'); | ||
exports.typescript = typescript; | ||
|
||
const webpackResolve = require.resolve('webpack'); | ||
exports.webpackResolve = webpackResolve; | ||
|
||
const webpack = require('webpack'); | ||
exports.webpack = webpack; | ||
|
||
const webpackBundleAnalyzerResolve = require.resolve('webpack-bundle-analyzer'); | ||
exports.webpackBundleAnalyzerResolve = webpackBundleAnalyzerResolve; | ||
|
||
const webpackBundleAnalyzer = require('webpack-bundle-analyzer'); | ||
exports.webpackBundleAnalyzer = webpackBundleAnalyzer; | ||
|
||
const webpackCliResolve = require.resolve('webpack-cli'); | ||
exports.webpackCliResolve = webpackCliResolve; | ||
|
||
const WebpackCli = require('webpack-cli'); | ||
exports.WebpackCli = WebpackCli; | ||
|
||
const webpackDevServerResolve = require.resolve('webpack-dev-server'); | ||
exports.webpackDevServerResolve = webpackDevServerResolve; | ||
|
||
const WebpackDevServer = require('webpack-dev-server'); | ||
exports.WebpackDevServer = WebpackDevServer; | ||
|
||
const webpackMergeResolve = require.resolve('webpack-merge'); | ||
exports.webpackMergeResolve = webpackMergeResolve; | ||
|
||
const webpackMerge = require('webpack-merge'); | ||
exports.webpackMerge = webpackMerge; | ||
|
||
const yargsResolve = require.resolve('yargs'); | ||
exports.yargsResolve = yargsResolve; | ||
|
||
const yargs = require('yargs'); | ||
exports.yargs = yargs; |
Oops, something went wrong.