Skip to content

Commit

Permalink
Merge pull request #54 from uswds/release-1.0.0
Browse files Browse the repository at this point in the history
USWDS Compile 1.0.0
  • Loading branch information
thisisdano authored Dec 15, 2022
2 parents a59ce25 + 822bbf8 commit f5267eb
Show file tree
Hide file tree
Showing 6 changed files with 507 additions and 588 deletions.
80 changes: 80 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Bug Report 🐞
description: Report a bug and help USWDS Compile improve.
title: "USWDS-Compile - Bug: [YOUR TITLE]"
labels: ['Type: Bug','Status: Triage','Needs: Confirmation']
body:
- type: textarea
id: problem
attributes:
label: Describe the bug
description: Add a clear and concise description of the bug. Let us know if it impacts major or minor functionality and if you have workaround.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the bug
description: Describe how to reproduce this issue.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error...
validations:
required: true
- type: textarea
id: expectation
attributes:
label: Expected Behavior
description: Add a clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
id: code
attributes:
label: Related code
description: If available, include relevant code snippets or a link to a demo of the bug.
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Add screenshots to help provide context, if applicable.
validations:
required: false
- type: textarea
id: system
attributes:
label: System setup
description: Provide your system details. Be sure to include your USWDS Compile and USWDS versions, device, operating system, and browser (with version).
placeholder: |
- USWDS Compile version:
- USWDS version:
- Device:
- Operating system:
- Browser and version:
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context about the problem.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: Please confirm the following
options:
- label:
I agree to follow this project's [Code of
Conduct](https://designsystem.digital.gov/about/community/#community-conduct).
required: true
- label:
I checked the [current
issues](https://github.com/uswds/uswds-compile/issues) for
duplicate bug reports.
required: true
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Feature Request 💡
description: Suggest a new idea for USWDS Compile.
title: 'USWDS-Compile - Feature: [YOUR TITLE]'
labels: ['Type: Feature Request','Status: Triage']
body:
- type: markdown
attributes:
value: '## Feature Request 💡'
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem? Please describe.
description: "Provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]"
validations:
required: true
- type: textarea
id: solution
attributes:
label: "Describe the solution you'd like"
description: "Provide a clear and concise description of what you want to happen."
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: "Describe alternatives you've considered"
description: "Provide a clear and concise description of any alternative solutions or features you've considered."
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional context
description: "Add any other context or screenshots about the feature request."
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: Please confirm the following
options:
- label:
I agree to follow this project's [Code of
Conduct](https://designsystem.digital.gov/about/community/#community-conduct).
required: true
- label:
I checked the [current
issues](https://github.com/uswds/uswds-compile/issues) for
duplicate feature requests.
required: true
16 changes: 16 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Add all issues to project board

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.1.0
with:
project-url: https://github.com/orgs/uswds/projects/8
github-token: ${{ secrets.ADD_TO_PROJECT }}
26 changes: 13 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const copy = {
colors.blue,
`Copy USWDS theme files: ${getSrcFrom("theme")}${paths.dist.theme}`
);
return src(`${getSrcFrom("theme")}/**/**`.replaceAll("//", "/")).pipe(
return src(`${getSrcFrom("theme")}/**/**`.replace("//", "/")).pipe(
dest(paths.dist.theme)
);
},
Expand All @@ -110,7 +110,7 @@ const copy = {
colors.blue,
`Copy USWDS fonts: ${getSrcFrom("fonts")}${paths.dist.fonts}`
);
return src(`${getSrcFrom("fonts")}/**/**`.replaceAll("//", "/")).pipe(
return src(`${getSrcFrom("fonts")}/**/**`.replace("//", "/")).pipe(
dest(paths.dist.fonts)
);
},
Expand All @@ -119,7 +119,7 @@ const copy = {
colors.blue,
`Copy USWDS images: ${getSrcFrom("img")}${paths.dist.img}`
);
return src(`${getSrcFrom("img")}/**/**`.replaceAll("//", "/")).pipe(
return src(`${getSrcFrom("img")}/**/**`.replace("//", "/")).pipe(
dest(paths.dist.img)
);
},
Expand All @@ -128,7 +128,7 @@ const copy = {
colors.blue,
`Copy USWDS compiled JS: ${getSrcFrom("js")}${paths.dist.js}`
);
return src(`${getSrcFrom("js")}/**/**`.replaceAll("//", "/")).pipe(
return src(`${getSrcFrom("js")}/**/**`.replace("//", "/")).pipe(
dest(paths.dist.js)
);
},
Expand Down Expand Up @@ -174,13 +174,13 @@ function buildSass() {
// 2. uswds organization directory (npm packages)
getSrcFrom("uswds"),
// 3. v2 packages directory
`${getSrcFrom("sass")}/packages`.replaceAll("//", "/"),
`${getSrcFrom("sass")}/packages`.replace("//", "/"),
// 4. local uswds package
getSrcFrom("sass"),
],
};

return src([`${paths.dist.theme}/*.scss`.replaceAll("//", "/")])
return src([`${paths.dist.theme}/*.scss`.replace("//", "/")])
.pipe(sourcemaps.init({ largeFile: true }))
.pipe(
sass({ includePaths: buildSettings.includes }).on("error", handleError)
Expand All @@ -194,21 +194,21 @@ function buildSass() {
function watchSass() {
return watch(
[
`${paths.dist.theme}/**/*.scss`.replaceAll("//", "/"),
`${paths.src.projectSass}/**/*.scss`.replaceAll("//", "/"),
`${paths.dist.theme}/**/*.scss`.replace("//", "/"),
`${paths.src.projectSass}/**/*.scss`.replace("//", "/"),
],
buildSass
);
}

function getSpritePaths(spritePaths = []) {
const defaultSpritePath = `${paths.dist.img}/usa-icons/**/*.svg`.replaceAll(
const defaultSpritePath = `${paths.dist.img}/usa-icons/**/*.svg`.replace(
"//",
"/"
);

const customSpritePath = paths.src.projectIcons.length
? `${paths.src.projectIcons}/**/*.svg`.replaceAll("//", "/")
? `${paths.src.projectIcons}/**/*.svg`.replace("//", "/")
: "";

if (customSpritePath) {
Expand Down Expand Up @@ -244,15 +244,15 @@ function buildSprite() {
}

function renameSprite() {
return src(`${paths.dist.img}/usa-icons.svg`.replaceAll("//", "/"), {
return src(`${paths.dist.img}/usa-icons.svg`.replace("//", "/"), {
allowEmpty: true,
})
.pipe(rename(`${paths.dist.img}/sprite.svg`.replaceAll("//", "/")))
.pipe(rename(`${paths.dist.img}/sprite.svg`.replace("//", "/")))
.pipe(dest(`./`));
}

function cleanSprite() {
return del(`${paths.dist.img}/usa-icons.svg`.replaceAll("//", "/"));
return del(`${paths.dist.img}/usa-icons.svg`.replace("//", "/"));
}

exports.settings = settings;
Expand Down
Loading

0 comments on commit f5267eb

Please sign in to comment.