-
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.
Merge pull request #147 from VanishMax/develop
Release 1.0
- Loading branch information
Showing
439 changed files
with
18,670 additions
and
7,369 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
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 |
---|---|---|
|
@@ -4,7 +4,5 @@ | |
yarn-error.log | ||
/__sapper__/ | ||
.idea | ||
yarn.lock | ||
package-lock.json | ||
webpack.config.js | ||
.env |
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,13 @@ | ||
{ | ||
"plugins": [ | ||
"stylelint-scss", | ||
], | ||
"extends": ["stylelint-config-standard"], | ||
"rules": { | ||
"number-leading-zero": "never", | ||
"selector-list-comma-newline-after": null, | ||
"no-descending-specificity": null, | ||
"at-rule-no-unknown": null, | ||
"scss/at-rule-no-unknown": true, | ||
}, | ||
} |
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,20 @@ | ||
FROM node:13-alpine | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
||
# install our dependencies | ||
COPY .eslintrc package.json yarn.lock rollup.config.js /app/ | ||
RUN yarn | ||
|
||
# copy the project code | ||
COPY src /app/src | ||
COPY static /app/static | ||
|
||
# expose the server port | ||
EXPOSE 3000 | ||
# Expose a Sapper dev port. Only for development | ||
EXPOSE 10000 | ||
|
||
# define the default command to run when starting the container | ||
CMD ["yarn", "dev"] |
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,21 @@ | ||
FROM node:13-alpine | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
||
# install our dependencies | ||
COPY .env .eslintrc package.json yarn.lock rollup.config.js /app/ | ||
RUN yarn | ||
|
||
# copy the project code | ||
COPY src /app/src | ||
COPY static /app/static | ||
|
||
# Build the project | ||
RUN yarn build | ||
|
||
# expose the server port | ||
EXPOSE 3000 | ||
|
||
# define the default command to run when starting the container | ||
CMD ["yarn", "start"] |
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,166 @@ | ||
import re | ||
from subprocess import run | ||
|
||
|
||
SASS_PATH = 'sass' | ||
POSTCSS_PATH = 'postcss' | ||
|
||
|
||
common = [ | ||
'global/normalize', | ||
'global/common', | ||
'global/ui-kit', | ||
] | ||
|
||
layout_default = [ | ||
'page-components/header', | ||
'page-components/notification-center', | ||
'page-components/empty-state', | ||
'page-components/footer', | ||
] | ||
|
||
styles = { | ||
'home': [ | ||
'home/header', | ||
'home/main', | ||
'home/tagline', | ||
'home/how-to', | ||
'home/contacts', | ||
'home/options', | ||
'home/store', | ||
'page-components/empty-state', | ||
'page-components/notification-center', | ||
'page-components/footer', | ||
], | ||
'_error': [ | ||
'page-components/404', | ||
'page-components/403', | ||
], | ||
'dashboard': [ | ||
'admin-dashboard/main', | ||
], | ||
'profile': [ | ||
'profile/quick-info', | ||
'profile/main-card', | ||
'profile/timeline', | ||
'profile/leave-feedback-modal', | ||
'profile/export-data-modal', | ||
'profile/statistics', | ||
'profile/bar-colors', | ||
'profile/notifications', | ||
'page-components/modal-dialog', | ||
], | ||
'store': [ | ||
'page-components/tagline', | ||
'page-components/filters', | ||
'store/filters-spec', | ||
'store/main', | ||
'page-components/pagination', | ||
], | ||
'products_new': [ | ||
'create-product/main', | ||
'create-product/preview-card', | ||
'page-components/modal-dialog', | ||
], | ||
'products_id': [ | ||
'view-product/main', | ||
'page-components/modal-dialog', | ||
], | ||
'products_id_edit': [ | ||
'create-product/main', | ||
'create-product/preview-card', | ||
'page-components/modal-dialog', | ||
], | ||
'projects': [ | ||
'page-components/tagline', | ||
'page-components/filters', | ||
'projects/filters-spec', | ||
'projects/main', | ||
], | ||
'projects_new': [ | ||
'create-project/steps', | ||
'create-project/main', | ||
'create-project/general', | ||
'create-project/activity', | ||
'create-project/actions', | ||
'page-components/create-activity', | ||
], | ||
'projects_past': [ | ||
'page-components/tagline', | ||
'page-components/filters', | ||
'projects/filters-spec', | ||
'projects/main', | ||
], | ||
'projects_id': [ | ||
'view-project/main', | ||
'view-project/activity', | ||
'view-project/activity-user', | ||
'view-project/activity-moderated', | ||
'view-project/activity-finalizing', | ||
'review-project/main', | ||
'page-components/create-activity', | ||
'view-project/moderators', | ||
'view-project/proper-grid', | ||
'view-project/report-performance-modal', | ||
'view-project/read-feedback-modal', | ||
'profile/leave-feedback-modal', | ||
'view-project/apply-modal', | ||
'page-components/modal-dialog', | ||
], | ||
'projects_id_edit': [ | ||
'create-project/steps', | ||
'create-project/main', | ||
'create-project/general', | ||
'create-project/activity', | ||
'create-project/actions', | ||
'edit-project/main', | ||
'page-components/create-activity', | ||
], | ||
'projects_id_review': [ | ||
'view-project/main', | ||
'view-project/activity', | ||
'view-project/activity-moderated', | ||
'view-project/activity-finalizing', | ||
'review-project/main', | ||
'view-project/moderators', | ||
'page-components/modal-dialog', | ||
], | ||
} | ||
|
||
def build_bundle(contents, output): | ||
'''Build a minified CSS bundle at path `output` from the files listed in `contents`.''' | ||
sass_bundled = '' | ||
for file in contents: | ||
directory, name = file.split('/') | ||
with open(f'static/css/{directory}/src/{name}.scss') as sass_file: | ||
sass_bundled += sass_file.read() + '\n' | ||
|
||
sass_bundled = re.sub('@import "[^"]+";', '', sass_bundled) | ||
sass_bundled = ( | ||
'@import "static/css/global/src/_mixins.scss";\n' | ||
+ '@import "static/css/global/src/_variables.scss";\n' | ||
+ sass_bundled | ||
) | ||
|
||
run([SASS_PATH, '--stdin', output, '-s', 'compressed', '--no-source-map'], | ||
input=sass_bundled, | ||
text=True, | ||
check=True) | ||
|
||
run([POSTCSS_PATH, output, '--use', 'autoprefixer', '--no-map', '-r'], | ||
input=sass_bundled, | ||
text=True) | ||
|
||
|
||
def get_all_bundles(): | ||
bundle_fmt = 'static/css/bundles/{}.min.css' | ||
|
||
build_bundle(common, bundle_fmt.format('common')) | ||
|
||
build_bundle(layout_default, bundle_fmt.format('layout-default')) | ||
|
||
for page in styles: | ||
build_bundle(styles[page], bundle_fmt.format(page.replace('_', '-'))) | ||
|
||
if __name__ == '__main__': | ||
get_all_bundles() |
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2019", | ||
"allowSyntheticDefaultImports": false, | ||
"baseUrl": "./", | ||
"paths": { | ||
"@/*": ["src/*"], | ||
} | ||
}, | ||
"exclude": ["node_modules", "dist"] | ||
} |
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
Oops, something went wrong.