diff --git a/package.json b/package.json index 9a474e0d..4d7b794e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "description": "ATST Stateless Services", "main": "index.js", "scripts": { + "watch": "parcel watch static/js/index.js -d static/assets -o index.js --no-autoinstall", + "build": "parcel build static/js/index.js -d static/assets -o index.js --no-autoinstall", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", @@ -13,5 +15,8 @@ "parcel": "^1.9.7", "uswds": "^1.6.3", "vue": "^2.5.17" + }, + "devDependencies": { + "node-sass": "^4.9.2" } } diff --git a/static/js/index.js b/static/js/index.js new file mode 100644 index 00000000..9cc49957 --- /dev/null +++ b/static/js/index.js @@ -0,0 +1,4 @@ +import classes from '../scss/atat.scss' + +import './thing' + diff --git a/static/js/thing.js b/static/js/thing.js new file mode 100644 index 00000000..033b8cd3 --- /dev/null +++ b/static/js/thing.js @@ -0,0 +1,7 @@ +console.log('hanlo again') +window.onload = function() { + console.log('boop') + const thing = document.querySelector('#hello') + thing.innerHTML = 'hanlo friendo' +} + diff --git a/scss/README.md b/static/scss/README.md similarity index 100% rename from scss/README.md rename to static/scss/README.md diff --git a/scss/atat.scss b/static/scss/atat.scss similarity index 94% rename from scss/atat.scss rename to static/scss/atat.scss index b4ae7797..040cc201 100644 --- a/scss/atat.scss +++ b/static/scss/atat.scss @@ -1,5 +1,5 @@ @import 'core/variables'; -@import '../node_modules/uswds/src/stylesheets/uswds'; +@import '../../node_modules/uswds/src/stylesheets/uswds'; @import 'core/grid'; @import 'core/util'; diff --git a/scss/components/_alerts.scss b/static/scss/components/_alerts.scss similarity index 100% rename from scss/components/_alerts.scss rename to static/scss/components/_alerts.scss diff --git a/scss/components/_empty_state.scss b/static/scss/components/_empty_state.scss similarity index 100% rename from scss/components/_empty_state.scss rename to static/scss/components/_empty_state.scss diff --git a/scss/components/_footer.scss b/static/scss/components/_footer.scss similarity index 100% rename from scss/components/_footer.scss rename to static/scss/components/_footer.scss diff --git a/scss/components/_global_layout.scss b/static/scss/components/_global_layout.scss similarity index 100% rename from scss/components/_global_layout.scss rename to static/scss/components/_global_layout.scss diff --git a/scss/components/_global_navigation.scss b/static/scss/components/_global_navigation.scss similarity index 100% rename from scss/components/_global_navigation.scss rename to static/scss/components/_global_navigation.scss diff --git a/scss/components/_modal.scss b/static/scss/components/_modal.scss similarity index 100% rename from scss/components/_modal.scss rename to static/scss/components/_modal.scss diff --git a/scss/components/_progress_menu.scss b/static/scss/components/_progress_menu.scss similarity index 96% rename from scss/components/_progress_menu.scss rename to static/scss/components/_progress_menu.scss index 3ca7bb72..a675dfb7 100644 --- a/scss/components/_progress_menu.scss +++ b/static/scss/components/_progress_menu.scss @@ -88,7 +88,7 @@ } &--complete:before { - content: url('/static/icons/checkmark.svg'); + content: url('#{$asset-path}/icons/checkmark.svg'); background-color: $color-blue; border: 2px solid $color-blue; font-size: $h6-font-size; @@ -100,4 +100,4 @@ } } -} \ No newline at end of file +} diff --git a/scss/components/_search_bar.scss b/static/scss/components/_search_bar.scss similarity index 95% rename from scss/components/_search_bar.scss rename to static/scss/components/_search_bar.scss index f5c031f8..dbc795d2 100644 --- a/scss/components/_search_bar.scss +++ b/static/scss/components/_search_bar.scss @@ -62,7 +62,7 @@ text-align: center; &:after { - content: url('/static/icons/search.svg'); + content: url('#{$asset-path}/icons/search.svg'); display: inline-block; width: 1.6rem; height: 1.6rem; diff --git a/scss/components/_site_action.scss b/static/scss/components/_site_action.scss similarity index 100% rename from scss/components/_site_action.scss rename to static/scss/components/_site_action.scss diff --git a/scss/components/_topbar.scss b/static/scss/components/_topbar.scss similarity index 100% rename from scss/components/_topbar.scss rename to static/scss/components/_topbar.scss diff --git a/scss/components/_workspace_layout.scss b/static/scss/components/_workspace_layout.scss similarity index 100% rename from scss/components/_workspace_layout.scss rename to static/scss/components/_workspace_layout.scss diff --git a/scss/core/_grid.scss b/static/scss/core/_grid.scss similarity index 100% rename from scss/core/_grid.scss rename to static/scss/core/_grid.scss diff --git a/scss/core/_util.scss b/static/scss/core/_util.scss similarity index 100% rename from scss/core/_util.scss rename to static/scss/core/_util.scss diff --git a/scss/core/_variables.scss b/static/scss/core/_variables.scss similarity index 100% rename from scss/core/_variables.scss rename to static/scss/core/_variables.scss diff --git a/scss/elements/_action_group.scss b/static/scss/elements/_action_group.scss similarity index 100% rename from scss/elements/_action_group.scss rename to static/scss/elements/_action_group.scss diff --git a/scss/elements/_block_lists.scss b/static/scss/elements/_block_lists.scss similarity index 100% rename from scss/elements/_block_lists.scss rename to static/scss/elements/_block_lists.scss diff --git a/scss/elements/_buttons.scss b/static/scss/elements/_buttons.scss similarity index 100% rename from scss/elements/_buttons.scss rename to static/scss/elements/_buttons.scss diff --git a/scss/elements/_diff.scss b/static/scss/elements/_diff.scss similarity index 100% rename from scss/elements/_diff.scss rename to static/scss/elements/_diff.scss diff --git a/scss/elements/_icon_link.scss b/static/scss/elements/_icon_link.scss similarity index 100% rename from scss/elements/_icon_link.scss rename to static/scss/elements/_icon_link.scss diff --git a/scss/elements/_icons.scss b/static/scss/elements/_icons.scss similarity index 100% rename from scss/elements/_icons.scss rename to static/scss/elements/_icons.scss diff --git a/scss/elements/_inputs.scss b/static/scss/elements/_inputs.scss similarity index 100% rename from scss/elements/_inputs.scss rename to static/scss/elements/_inputs.scss diff --git a/scss/elements/_labels.scss b/static/scss/elements/_labels.scss similarity index 100% rename from scss/elements/_labels.scss rename to static/scss/elements/_labels.scss diff --git a/scss/elements/_panels.scss b/static/scss/elements/_panels.scss similarity index 100% rename from scss/elements/_panels.scss rename to static/scss/elements/_panels.scss diff --git a/scss/elements/_sidenav.scss b/static/scss/elements/_sidenav.scss similarity index 100% rename from scss/elements/_sidenav.scss rename to static/scss/elements/_sidenav.scss diff --git a/scss/elements/_tables.scss b/static/scss/elements/_tables.scss similarity index 100% rename from scss/elements/_tables.scss rename to static/scss/elements/_tables.scss diff --git a/scss/elements/_typography.scss b/static/scss/elements/_typography.scss similarity index 100% rename from scss/elements/_typography.scss rename to static/scss/elements/_typography.scss diff --git a/scss/sections/_login.scss b/static/scss/sections/_login.scss similarity index 100% rename from scss/sections/_login.scss rename to static/scss/sections/_login.scss diff --git a/scss/sections/_member_edit.scss b/static/scss/sections/_member_edit.scss similarity index 100% rename from scss/sections/_member_edit.scss rename to static/scss/sections/_member_edit.scss diff --git a/scss/sections/_project_edit.scss b/static/scss/sections/_project_edit.scss similarity index 100% rename from scss/sections/_project_edit.scss rename to static/scss/sections/_project_edit.scss diff --git a/scss/sections/_projects_list.scss b/static/scss/sections/_projects_list.scss similarity index 100% rename from scss/sections/_projects_list.scss rename to static/scss/sections/_projects_list.scss diff --git a/scss/sections/_request_approval.scss b/static/scss/sections/_request_approval.scss similarity index 100% rename from scss/sections/_request_approval.scss rename to static/scss/sections/_request_approval.scss diff --git a/templates/base.html b/templates/base.html index 2414f6f1..aaae0374 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,9 +8,7 @@