Skip to content

Commit

Permalink
chore(css): #MZI-235 migrate css within module
Browse files Browse the repository at this point in the history
  • Loading branch information
alex.delaveau committed Aug 25, 2023
1 parent 3ba62f3 commit 6ddc9c2
Show file tree
Hide file tree
Showing 9 changed files with 184 additions and 108 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/dev-check-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ jobs:
runs-on: ubuntu-latest

container:
image: opendigitaleducation/node:10-alpine
image: opendigitaleducation/node:16-alpine
options: --user root -v ${{ github.workspace }}:/home/node/:rw

steps:
- uses: actions/checkout@v1
- name: Run npm install
run: npm install
- name: Run yarn install
run: yarn install
- name: Run build node with Gulp
run: node_modules/gulp/bin/gulp.js build
- name: Run test
run: npm test
run: yarn test
- name: Run build node sass
run: yarn run build:sass

build-gradle-test:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ classes
*/out
/coverage/front/cobertura-coverage.xml
node_modules
package-lock.json
package-lock.json
/src/main/resources/public/css/
/yarn.lock
26 changes: 20 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ clean () {
buildNode () {
case `uname -s` in
MINGW*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install --no-bin-links && node_modules/gulp/bin/gulp.js build"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install --no-bin-links && node_modules/gulp/bin/gulp.js build && yarn run build:sass"
;;
*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install && node_modules/gulp/bin/gulp.js build"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install && node_modules/gulp/bin/gulp.js build && yarn run build:sass"
esac
}

buildGulp() {
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "node_modules/gulp/bin/gulp.js build"
}

buildCss() {
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn run build:sass"
}

buildGradle () {
docker-compose run --rm -u "$USER_UID:$GROUP_GID" gradle gradle shadowJar install publishToMavenLocal
}
Expand All @@ -41,10 +49,10 @@ testNode () {
rm -rf */build
case `uname -s` in
MINGW*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install --no-bin-links && node_modules/gulp/bin/gulp.js drop-cache && npm test"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install --no-bin-links && node_modules/gulp/bin/gulp.js drop-cache && yarn test"
;;
*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install && node_modules/gulp/bin/gulp.js drop-cache && npm test"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install && node_modules/gulp/bin/gulp.js drop-cache && yarn test"
esac
}

Expand All @@ -53,10 +61,10 @@ testNodeDev () {
rm -rf */build
case `uname -s` in
MINGW*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install --no-bin-links && node_modules/gulp/bin/gulp.js drop-cache && npm run test:dev"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install --no-bin-links && node_modules/gulp/bin/gulp.js drop-cache && yarn run test:dev"
;;
*)
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "npm install && node_modules/gulp/bin/gulp.js drop-cache && npm run test:dev"
docker-compose run --rm -u "$USER_UID:$GROUP_GID" node sh -c "yarn install && node_modules/gulp/bin/gulp.js drop-cache && yarn run test:dev"
esac
}

Expand Down Expand Up @@ -84,6 +92,12 @@ do
buildNode)
buildNode
;;
buildGulp)
buildGulp
;;
buildCss)
buildCss
;;
buildGradle)
buildGradle
;;
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ gradle:
- ~/.gradle:/home/gradle/.gradle

node:
image: opendigitaleducation/node:10-alpine
image: opendigitaleducation/node:16-alpine
working_dir: /home/node/app
net: host
volumes:
- ./:/home/node/app
- ~/.npm:/.npm
- ~/.gitconfig:/home/node/.gitconfig
- ~/.npmrc:/home/node/.npmrc
- ~/.bowerrc:/home/node/.bowerrc
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
"cobertura"
],
"moduleNameMapper": {
'^axios$': require.resolve('axios'),
"^@zimbra(.*)$": "<rootDir>/zimbra/src/main/resources/ts$1"
}
};
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"coverage": "./node_modules/.bin/jest --config jest.config.js --coverage",
"test": "npm run coverage",
"coverage:dev": "./node_modules/.bin/jest --config jest.config.js --coverage --watch --verbose false",
"test:dev": "npm run coverage:dev"
"test:dev": "npm run coverage:dev",
"build:sass": "sass --load-path=node_modules/ --no-source-map zimbra/src/main/resources/public/sass/index.scss zimbra/src/main/resources/public/css/conversation.css"
},
"repository": {
"type": "git",
Expand All @@ -19,11 +20,14 @@
"url": ""
},
"homepage": "",
"resolutions": {
"graceful-fs": "^4.2.11"
},
"dependencies": {
"@types/core-js": "0.9.42",
"@types/es6-promise": "^3.3.0",
"awesome-typescript-loader": "3.2.1",
"axios": "0.16.2",
"axios": "0.27.2",
"core-js": "2.4.1",
"entcore": "4.7.2",
"entcore-toolkit": "^1.0.1",
Expand All @@ -37,20 +41,22 @@
"yargs": "^8.0.2"
},
"devDependencies": {
"@types/jquery": "^2.0.34",
"@types/angular": "^1.6.55",
"@types/angular-mocks": "^1.7.1",
"@types/core-js": "0.9.42",
"@types/jest": "^22.2.0",
"@types/jest": "^27.5.2",
"@types/jquery": "^2.0.34",
"angular-mocks": "^1.8.2",
"axios-mock-adapter": "^1.19.0",
"entcore-css-lib": "npm:[email protected]",
"gulp-append-prepend": "^1.0.8",
"jest": "^24.7.1",
"gulp-replace": "^1.1.3",
"jest": "26.6.3",
"jest-environment-node": "^23.0.0",
"moment": "^2.21.0",
"ts-jest": "^22.4.2",
"underscore": "^1.8.3",
"angular-mocks": "^1.8.2",
"prettier": "^1.14.2",
"gulp-replace": "^1.1.3"
"sass": "^1.49.9",
"ts-jest": "^26.4.2",
"underscore": "^1.8.3"
}
}
Loading

0 comments on commit 6ddc9c2

Please sign in to comment.