Skip to content

Commit

Permalink
* (bluefox) Added sources to package
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jul 20, 2024
1 parent e0e0318 commit 81a0f81
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 70 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,9 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
-->

## Changelog
### **WORK IN PROGRESS**
* (bluefox) Added sources to package

### 6.1.3 (2024-07-20)
* (bluefox) Better typing of legacy connection

Expand Down
2 changes: 1 addition & 1 deletion craco-module-federation.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
}

const htmlWebpackPlugin = webpackConfig.plugins.find(
plugin => plugin.constructor.name === 'HtmlWebpackPlugin'
plugin => plugin.constructor.name === 'HtmlWebpackPlugin',
);

const myModule = require(moduleFederationConfigPath);
Expand Down
70 changes: 7 additions & 63 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
/**
* Copyright 2018-2023 bluefox <dogafox@gmail.com>
* Copyright 2018-2024 bluefox <dogafox@gmail.com>
*
* MIT License
*
**/
'use strict';

const gulp = require('gulp');
const babel = require('gulp-babel');
const sourcemaps = require('gulp-sourcemaps');
const typescript = require('gulp-typescript');
const fs = require('fs');
const cp = require('child_process');
const fs = require('node:fs');
const cp = require('node:child_process');

function npmInstall(dir) {
dir = dir || `${__dirname}/`;
Expand Down Expand Up @@ -75,28 +72,6 @@ gulp.task('copy', () => Promise.all([
})
]));

const tsProject = typescript.createProject('tsconfig.build.json');

gulp.task('typedefs', () => {
return gulp.src(['src/**/*.js', 'src/**/*.jsx', '!src/gulpfile.js'])
.pipe(tsProject())
.dts
.pipe(gulp.dest('dist'));
});

const babelOptions = {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-runtime',
],
};

function handleError (error) {
console.log(error.toString());
this.emit('end');
}

gulp.task('patchReadme', async () => {
const pack = require('./package.json');
let readme = fs.readFileSync(`${__dirname}/README.md`).toString('utf8');
Expand All @@ -105,42 +80,11 @@ gulp.task('patchReadme', async () => {
});

gulp.task('compile', gulp.parallel('copy',
'typedefs',
() => Promise.all([
gulp.src(['src/Dialogs/*.js', 'src/Dialogs/**/*.js', 'src/Dialogs/*.jsx', 'src/Dialogs/**/*.jsx'])
.pipe(sourcemaps.init())
.pipe(babel(babelOptions))
.on('error', handleError)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist/Dialogs')),

gulp.src(['src/icons/*.js', 'src/icons/**/*.js', 'src/icons/*.jsx', 'src/icons/**/*.jsx'])
.pipe(sourcemaps.init())
.pipe(babel(babelOptions))
.on('error', handleError)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist/icons')),

gulp.src(['src/*.js', 'src/*.jsx', '!src/gulpfile.js'])
.pipe(sourcemaps.init())
.pipe(babel(babelOptions))
.on('error', handleError)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist')),

gulp.src(['src/Components/*.js', 'src/Components/**/*.js', 'src/Components/*.jsч', 'src/Components/**/*.jsx'])
.pipe(sourcemaps.init())
.pipe(babel({
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-flow'],
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-runtime',
['inline-json-import', {}]
]
}))
.on('error', handleError)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist/Components')),
gulp.src(['src/*/*.tsx', 'src/*/*.css'])
.pipe(gulp.dest('dist/src')),
gulp.src(['src/*.tsx', 'src/*.css'])
.pipe(gulp.dest('dist/src')),

gulp.src(['src/i18n/*.json'])
.pipe(gulp.dest('dist/i18n')),
Expand Down
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
"@types/react-color": "^3.0.12",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"ajv": "^8.17.1",
"babel": "^6.23.0",
"babel-plugin-inline-json-import": "^0.3.2",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
Expand All @@ -81,10 +79,6 @@
"eslint-plugin-react": "^7.34.4",
"eslint-plugin-react-hooks": "^4.6.2",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-sourcemaps": "^3.0.0",
"gulp-typescript": "^6.0.0-alpha.1",
"ts-node": "^10.9.2",
"typescript": "^5.5.3"
}
}

0 comments on commit 81a0f81

Please sign in to comment.