setting up vanilla macros

This commit is contained in:
immortalcodes
2025-02-05 17:37:56 +05:30
committed by MariaPaula Trujillo
parent e186bec895
commit 0de179040b
4 changed files with 10 additions and 7 deletions

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ package-lock.json
# [build] Built files
*.*.map
/static/js/dist/*.js
/templates/_macros
# [env] Local environment settings
.*.hash

View File

@ -44,6 +44,7 @@ COPY --from=python-dependencies /root/.local/bin /root/.local/bin
COPY . .
RUN rm -rf package.json yarn.lock .babelrc webpack.config.js requirements.txt Dockerfile .stylelintrc .gitignore .djlintrc
COPY --from=build-css /srv/static/css static/css
COPY --from=build-js /srv/node_modules/vanilla-framework/templates/_macros templates/_macros
COPY --from=build-js /srv/static/js/dist static/js/dist
# Set build ID

View File

@ -7,10 +7,11 @@
"watch": "yarn run watch-css && yarn run watch-js",
"watch-js": "webpack --watch",
"watch-css": "watch -p 'static/sass/**/*.scss' -c 'yarn run build'",
"build": "yarn run build-css && yarn run build-js",
"build": "yarn run build-css && yarn run build-js && yarn run copy-macros",
"build-js": "yarn run webpack && yarn run build-latest-news",
"build-latest-news": "cp node_modules/@canonical/latest-news/dist/latest-news.js static/js/dist",
"build-css": "sass static/sass/styles.scss static/css/styles.css --load-path=node_modules --style=compressed && postcss --map false --use autoprefixer --replace 'static/css/**/*.css'",
"copy-macros": "rm -rf templates/_macros && cp -r node_modules/vanilla-framework/templates/_macros templates/_macros",
"lint-python": "flake8 --extend-ignore=E203 webapp && black --check --line-length 79 webapp",
"lint-scss": "stylelint static/**/*.scss",
"lint-js": "prettier -c 'static/js/*.{js,jsx,ts,tsx}'",
@ -33,7 +34,7 @@
"postcss": "8.4.49",
"postcss-cli": "11.0.0",
"sass": "1.81.0",
"vanilla-framework": "4.18.3",
"vanilla-framework": "4.20.3",
"webpack": "^5.97.1"
},
"devDependencies": {
@ -44,4 +45,4 @@
"watch-cli": "0.2.3",
"webpack-cli": "^5.1.4"
}
}
}

View File

@ -2000,10 +2000,10 @@ util-deprecate@^1.0.2:
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
vanilla-framework@4.18.3:
version "4.18.3"
resolved "https://registry.npmjs.org/vanilla-framework/-/vanilla-framework-4.18.3.tgz"
integrity sha512-WsOgD/iI27de80cMS9IYFq1X4nbsEOFfqUmTT7V57k5C20WHwshUA0ocw4R21ThN+A7amh4+c7i0mtcr9a/+uQ==
vanilla-framework@4.20.3:
version "4.20.3"
resolved "https://registry.yarnpkg.com/vanilla-framework/-/vanilla-framework-4.20.3.tgz#a306e80f32f5c6b6f107c02e64cc642c6eb32148"
integrity sha512-8nE8BxHRckdjo8VYW0jVLK9JMz1XAoTZcKGweg0jM8cV+/D313pPyomEeODAD1qq66yf/W0RfHTXv/wp0AaYfQ==
verbalize@^0.1.2:
version "0.1.2"