Skip to content

Commit

Permalink
Merge pull request #246 from uswds/develop
Browse files Browse the repository at this point in the history
Public Sans v2.001
  • Loading branch information
thisisdano authored May 11, 2022
2 parents 49ad27d + 0ebafde commit c792316
Show file tree
Hide file tree
Showing 164 changed files with 8,416 additions and 4,504 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.2
2 changes: 1 addition & 1 deletion FONTLOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To contribute to Public Sans please read [CONTRIBUTING.md](https://github.com/us

See [the Public Sans releases page](https://github.com/uswds/public-sans/releases) for more details about changes to the typeface.

February 25 2022 Public Sans v2.001
April 29 2022 Public Sans v2.001
- https://github.com/uswds/public-sans/releases/tag/v2.001
General
- Fixed style linking in stat table
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source "https://rubygems.org"

gem "jekyll", ">= 4.1.1"
gem "thin"
gem "webrick", "~> 1.7"
42 changes: 22 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,73 @@ GEM
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.7)
daemons (1.3.1)
em-websocket (0.5.1)
concurrent-ruby (1.1.10)
daemons (1.4.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.13.1)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.5)
http_parser.rb (0.8.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jekyll (4.1.1)
jekyll (4.2.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-sass-converter (2.1.0)
terminal-table (~> 2.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.3.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
public_suffix (4.0.7)
rack (2.2.3)
rb-fsevent (0.10.4)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.22.0)
rouge (3.28.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (1.8.0)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thin (1.7.2)
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
unicode-display_width (1.7.0)
unicode-display_width (1.8.0)
webrick (1.7.0)

PLATFORMS
ruby

DEPENDENCIES
jekyll (>= 4.1.1)
thin
webrick (~> 1.7)

BUNDLED WITH
2.1.4
2.3.12
Binary file modified fonts/otf/PublicSans-Black.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-BlackItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Bold.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-BoldItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-ExtraBold.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-ExtraBoldItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-ExtraLight.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-ExtraLightItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Italic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Light.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-LightItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Medium.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-MediumItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Regular.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-SemiBold.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-SemiBoldItalic.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-Thin.otf
Binary file not shown.
Binary file modified fonts/otf/PublicSans-ThinItalic.otf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Black.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-BlackItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Bold.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-BoldItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-ExtraBold.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-ExtraBoldItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-ExtraLight.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-ExtraLightItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Italic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Light.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-LightItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Medium.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-MediumItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Regular.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-SemiBold.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-SemiBoldItalic.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-Thin.ttf
Binary file not shown.
Binary file modified fonts/ttf/PublicSans-ThinItalic.ttf
Binary file not shown.
Binary file modified fonts/variable/PublicSans-Italic[wght].ttf
Binary file not shown.
Binary file modified fonts/variable/PublicSans[wght].ttf
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Black.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Black.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-BlackItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-BlackItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Bold.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Bold.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-BoldItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-BoldItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraBold.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraBold.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraBoldItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraBoldItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraLight.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraLight.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraLightItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ExtraLightItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Italic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Italic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Light.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Light.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-LightItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-LightItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Medium.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Medium.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-MediumItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-MediumItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Regular.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Regular.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-SemiBold.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-SemiBold.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-SemiBoldItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-SemiBoldItalic.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Thin.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-Thin.woff2
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ThinItalic.woff
Binary file not shown.
Binary file added fonts/webfonts/PublicSans-ThinItalic.woff2
Binary file not shown.
226 changes: 32 additions & 194 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,205 +1,43 @@
/*
* * * * * ==============================
* * * * * ==============================
* * * * * ==============================
* * * * * ==============================
========================================
========================================
========================================
----------------------------------------
USWDS SASS GULPFILE
----------------------------------------
*/
const { src, dest, series, parallel, watch } = require("gulp");
const uswds = require("@uswds/compile");

const autoprefixer = require("autoprefixer");
const csso = require("postcss-csso");
const gulp = require("gulp");
const pkg = require("./node_modules/uswds/package.json");
const postcss = require("gulp-postcss");
const replace = require("gulp-replace");
const sass = require("gulp-sass");
const sourcemaps = require("gulp-sourcemaps");
const uswds = require("./node_modules/uswds-gulp/config/uswds");
const del = require("del");
const svgSprite = require("gulp-svg-sprite");
const rename = require("gulp-rename");
uswds.settings.version = 3;
uswds.paths.src.projectSass = "./site/_sass";
uswds.paths.dist.img = "./site/assets/uswds/img";
uswds.paths.dist.fonts = "./site/assets/uswds/fonts";
uswds.paths.dist.js = "./site/assets/uswds/js";
uswds.paths.dist.css = "./site/assets/css";
uswds.paths.dist.theme = "./site/_sass";

// Required for "watch-webfonts" task.
const watch = require("gulp-watch");

sass.compiler = require("sass");

/*
----------------------------------------
PATHS
----------------------------------------
- All paths are relative to the
project root
- Don't use a trailing `/` for path
names
----------------------------------------
*/

// Project Sass source directory
const PROJECT_SASS_SRC = "./site/_sass";

// Images destination
const IMG_DEST = "./site/assets/uswds/img";

// Fonts destination
const FONTS_DEST = "./site/assets/uswds/fonts";

// Javascript destination
const JS_DEST = "./site/assets/uswds/js";

// Compiled CSS destination
const CSS_DEST = "./site/assets/css";

// Webfonts
const WEBFONTS_SRC = "./fonts/webfonts";
const WEBFONTS_DEST = "./site/assets/fonts";

/*
----------------------------------------
TASKS
----------------------------------------
*/

gulp.task("copy-uswds-setup", () => {
return gulp
.src(`${uswds}/scss/theme/**/**`)
.pipe(gulp.dest(`${PROJECT_SASS_SRC}`));
});

gulp.task("copy-uswds-fonts", () => {
return gulp.src(`${uswds}/fonts/**/**`).pipe(gulp.dest(`${FONTS_DEST}`));
});

gulp.task("copy-uswds-images", () => {
return gulp.src(`${uswds}/img/**/**`).pipe(gulp.dest(`${IMG_DEST}`));
});

gulp.task("copy-uswds-js", () => {
return gulp.src(`${uswds}/js/**/**`).pipe(gulp.dest(`${JS_DEST}`));
});

gulp.task("build-sass", function (done) {
var plugins = [
// Autoprefix
autoprefixer({
cascade: false,
grid: true,
}),
// Minify
csso({ forceMediaMerge: false }),
];
return gulp
.src([`${PROJECT_SASS_SRC}/*.scss`])
.pipe(sourcemaps.init({ largeFile: true }))
.pipe(
sass.sync({
includePaths: [
`${PROJECT_SASS_SRC}`,
`${uswds}/scss`,
`${uswds}/scss/packages`,
],
})
)
.pipe(replace(/\buswds @version\b/g, "based on uswds v" + pkg.version))
.pipe(postcss(plugins))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest(`${CSS_DEST}`))
.pipe(gulp.dest("./_site/assets/css"));
});
function copyWebfonts() {
return src(`${WEBFONTS_SRC}/**/**`)
.pipe(dest(WEBFONTS_DEST));
}

// SVG sprite configuration
config = {
shape: {
dimension: { // Set maximum dimensions
maxWidth: 24,
maxHeight: 24
},
id: {
separator: "-"
},
spacing: { // Add padding
padding: 0
}
},
mode: {
symbol: true // Activate the «symbol» mode
}
function watchWebfonts() {
return watch(`${WEBFONTS_SRC}/**/*`, copyWebfonts);
};

gulp.task("build-sprite", function (done) {
gulp.src(`${IMG_DEST}/usa-icons/**/*.svg`, {
allowEmpty: true,
})
.pipe(svgSprite(config))
.on("error", function (error) {
console.log("There was an error");
})
.pipe(gulp.dest(`${IMG_DEST}`))
.on("end", function () {
done();
});
});

gulp.task("rename-sprite", function (done) {
gulp.src(`${IMG_DEST}/symbol/svg/sprite.symbol.svg`, {
allowEmpty: true,
})
.pipe(rename(`${IMG_DEST}/sprite.svg`))
.pipe(gulp.dest(`./`))
.on("end", function () {
done();
});
});

gulp.task("clean-sprite", function (cb) {
cb();
return del.sync(`${IMG_DEST}/symbol`);
});

gulp.task(
"init",
gulp.series(
"copy-uswds-setup",
"copy-uswds-fonts",
"copy-uswds-images",
"copy-uswds-js",
"build-sass"
)
);

gulp.task("copy-webfonts", () => {
return gulp.src(`${WEBFONTS_SRC}/**/**`).pipe(gulp.dest(WEBFONTS_DEST));
});

gulp.task("watch-webfonts", () => {
gulp
.src(`${WEBFONTS_SRC}/**/*`, { base: WEBFONTS_SRC })
.pipe(watch(WEBFONTS_SRC, { base: WEBFONTS_SRC }))
.pipe(gulp.dest(WEBFONTS_DEST));
});


gulp.task("watch-sass", function () {
gulp.watch(`${PROJECT_SASS_SRC}/**/*.scss`, gulp.series("build-sass"));
});

gulp.task(
"watch",
gulp.series(
"copy-webfonts",
"build-sass",
gulp.parallel("watch-sass", "watch-webfonts")
exports.watch = series(
copyWebfonts,
uswds.compile,
parallel(
uswds.watch,
watchWebfonts
)
);

gulp.task("default", gulp.series("watch"));

gulp.task(
"svg-sprite",
gulp.series("build-sprite", "rename-sprite", "clean-sprite")
);
exports.compileIcons = uswds.compileIcons;
exports.copyWebfonts = copyWebfonts;
exports.copyFonts = uswds.copyFonts;
exports.copyImages = uswds.copyImages;
exports.copyJS = uswds.copyJS;
exports.copyTheme = uswds.copyTheme;
exports.copyAssets = uswds.copyAssets;
exports.update = series(uswds.copyImages, uswds.copyJS);
exports.buildSass = uswds.compile;
exports.watchSass = uswds.watch;
exports.default = this.watch;
Loading

0 comments on commit c792316

Please sign in to comment.