Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Octicons! #222

Merged
merged 99 commits into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
542d2f6
First commit on a react-octicons component
jonrohan Feb 21, 2018
2cb57f7
Renaming for npmjs
jonrohan Feb 21, 2018
b5a9afd
Updating sheild location
jonrohan Feb 21, 2018
0cccc4f
remove clasee
jonrohan Feb 21, 2018
a0d68d5
building babel dist
jonrohan Feb 22, 2018
d7728f2
Outputting to build instead
jonrohan Feb 22, 2018
36e3e4b
Setting up linting
jonrohan Feb 22, 2018
581a4f2
github-lint?
jonrohan Feb 22, 2018
60d21a7
1.1.0
jonrohan Feb 22, 2018
9d94633
1.1.0
jonrohan Feb 22, 2018
8f120ac
Be explicit so that it's not mixed up with index.scss
jonrohan Feb 22, 2018
20170b6
Making the sizing stricter
jonrohan Feb 23, 2018
11933d8
Large
jonrohan Feb 23, 2018
b41121c
Adding alignment options
jonrohan Feb 23, 2018
0071790
Merge branch 'master' into react_octicons
jonrohan Mar 24, 2018
ba46dc4
Removing lint from test
jonrohan Mar 24, 2018
c72f20b
Renaming
jonrohan Mar 26, 2018
a8a7a07
Updating react package to build components
jonrohan Mar 27, 2018
571e219
Revert package.json
jonrohan Mar 27, 2018
1b30538
Cleaning lint
jonrohan Mar 27, 2018
d2e5c24
Don't need this in files
jonrohan Mar 27, 2018
f962884
Importing separately for all vs specific octicons
jonrohan Mar 27, 2018
f0b872f
Adding named.js to the package files
jonrohan Mar 27, 2018
cfdb19f
slimmer icons, bulkier <Octicon>
shawnbot Jun 8, 2018
88e952f
UpperCase all the things
shawnbot Jun 8, 2018
661d320
export all the icons???
shawnbot Jun 8, 2018
eb64b31
Merge remote-tracking branch 'origin/master' into reocticons
shawnbot Jun 8, 2018
3a8157f
icon output fix, viewBox
shawnbot Jun 8, 2018
6f811ae
add parcel for testing
shawnbot Jun 8, 2018
98826f5
ignore stuff
shawnbot Jun 8, 2018
6a3c8ec
clarify
shawnbot Jun 8, 2018
4ecbf0e
use next.js
shawnbot Jun 8, 2018
635b444
make a table
shawnbot Jun 8, 2018
32a0078
add pages to files list
shawnbot Jun 8, 2018
5c07b32
reasonable FIGMA_DOMAIN default; bail on missing FIGMA_TOKEN
shawnbot Jun 25, 2018
e030c2c
remove unneeded rubocop:disable
shawnbot Jun 25, 2018
2cf602c
tidy
shawnbot Jun 25, 2018
85a6fe2
add icons/all endpoint for named icons
shawnbot Jun 25, 2018
f587796
clean up deps, add jest
shawnbot Jun 25, 2018
62487aa
add basic tests
shawnbot Jun 25, 2018
e7bdde9
add .babelrc that works with jest and next
shawnbot Jun 25, 2018
8404d60
add getIcon(name) example to demo app
shawnbot Jun 25, 2018
4d6dc42
start fleshing out new docs
shawnbot Jun 25, 2018
c86a792
add "small" size
shawnbot Jun 25, 2018
5adf596
add iconsByName object export to icons/all
shawnbot Jun 25, 2018
59e2c22
moar docs
shawnbot Jun 25, 2018
7df502a
add tree-shaking link
shawnbot Jun 25, 2018
7ab2d07
tidy up icon docs
shawnbot Jun 25, 2018
39df26a
updating props, examples
shawnbot Jun 25, 2018
aa3e559
refactor all icons exports
shawnbot Jun 26, 2018
0386dc2
update docs for new all icons exports
shawnbot Jun 26, 2018
5173a54
nix "ES6"
shawnbot Jun 26, 2018
5f23980
update the "about" bit
shawnbot Jun 26, 2018
91e7dfe
"Octicons for React" sounds better
shawnbot Jun 26, 2018
c996c55
linty
shawnbot Jun 26, 2018
4666318
add bit on custom icons, tweak Octicon language
shawnbot Jun 26, 2018
de30402
better explain the icon usage options
shawnbot Jun 26, 2018
ff8c997
v0.1.0
shawnbot Jun 27, 2018
fae9547
move script/build.js => script/build
shawnbot Jun 27, 2018
959f0b7
add comma in "GitHub, Inc."
shawnbot Jun 27, 2018
c1db936
update build script name; add preversion run-script
shawnbot Jun 27, 2018
131bb28
move react into peer and dev dependencies
shawnbot Jun 27, 2018
3e8f487
suggest node 8+
shawnbot Jun 27, 2018
9267ee9
move script/build => script/build.js
shawnbot Jun 27, 2018
4f4a9df
add eslint, tidy package.json, build scripts
shawnbot Jun 27, 2018
44ee3c6
add eslint configs
shawnbot Jun 27, 2018
babe5c4
tidy up icon builds
shawnbot Jun 27, 2018
c3e4956
remove un-applied quotes rule
shawnbot Jun 27, 2018
35029db
don't lint generated .js files
shawnbot Jun 27, 2018
e3c85df
eslint --fix
shawnbot Jun 27, 2018
6b9c1f9
add lint script
shawnbot Jun 27, 2018
0bec8ae
lint before testing
shawnbot Jun 27, 2018
970a58c
lint tests
shawnbot Jun 27, 2018
b57bf2d
doh
shawnbot Jun 27, 2018
f78cf21
add snapshot to Octicon test, hush console.error()
shawnbot Jun 27, 2018
e494f3d
add aria-hidden="true", user-select: none
shawnbot Jun 27, 2018
ea74679
try rollup?
shawnbot Jun 28, 2018
7115814
update version to match
shawnbot Jun 28, 2018
8351762
tidy up, improve Octicon tests
shawnbot Jun 28, 2018
02a007a
don't set 'module' in package.json
shawnbot Jun 28, 2018
4fce348
do sizing right, moar tests
shawnbot Jun 28, 2018
10a3731
move everything into src/
shawnbot Jun 28, 2018
5be4bd2
update rollup config
shawnbot Jun 28, 2018
c068058
write icons to src/icons
shawnbot Jun 28, 2018
e8e8929
remove lib/octicons_react/named.js from /.gitignore
shawnbot Jun 28, 2018
63ffd9d
wrapping
shawnbot Jun 28, 2018
fc73084
React (not React.js)
shawnbot Jun 28, 2018
d80832b
add stage-0, rename next env to "production"
shawnbot Jun 29, 2018
d23a00c
use .npmignore instead of files; downgrade next, install stage-0
shawnbot Jun 29, 2018
9d8aca0
refactor rollup config, output ESM + UMD
shawnbot Jun 29, 2018
ebbe36b
ignore dist/
shawnbot Jun 29, 2018
8269535
show all the octicons!
shawnbot Jun 29, 2018
db11ac7
tidy up rollup config, use env preset
shawnbot Jun 29, 2018
7c9d61d
nix es2015 preset (always use env!)
shawnbot Jun 29, 2018
b8f4a03
oops
shawnbot Jun 29, 2018
34a532e
simplify rollup config
shawnbot Jun 29, 2018
b014412
nix prepare run-script
shawnbot Jun 29, 2018
a008e25
use some primer components
shawnbot Jun 29, 2018
b61e03c
clean up build run-script logic, remove pages/ from .npmignore
shawnbot Jun 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lib/octicons_react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"homepage": "https://octicons.github.com",
"author": "GitHub, Inc.",
"license": "MIT",
"main": "index.js",
"main": "build/index.js",
"module": "index.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong for me to include. I removed it in 02a007a.

"repository": "primer/octicons",
"files": [
"build",
"icons",
"index.js",
"pages"
Expand All @@ -20,7 +22,8 @@
"test": "jest",
"start": "next",
"lint": "eslint index.js __tests__ script",
"build": "script/build.js",
"prebuild": "script/build.js",
"build": "rollup -c rollup.config.js",
"preversion": "npm run build -s",
"publish": "../../script/notify success",
"prepublishOnly": "../../script/notify pending",
Expand Down Expand Up @@ -49,7 +52,10 @@
"octicons": "7.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: octicons is indeed the source of truth, but it's a dev dependency because we build the icon components from the package rather than using a runtime dependency. No innerHTML, no parsing, just pure JSX.

"react": "^16.4.0",
"react-dom": "^16.4.1",
"react-test-renderer": "^16.4.1"
"react-test-renderer": "^16.4.1",
"rollup": "^0.62.0",
"rollup-plugin-babel": "^3.0.5",
"rollup-plugin-commonjs": "^9.1.3"
},
"peerDependencies": {
"react": ">=15"
Expand Down
18 changes: 18 additions & 0 deletions lib/octicons_react/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import babel from 'rollup-plugin-babel'
import commonjs from 'rollup-plugin-commonjs'

export default {
input: 'index.js',
plugins: [
babel({
babelrc: false,
exclude: 'node_modules/**',
presets: [['env', {modules: false}], 'react']
}),
commonjs()
],
output: {
file: 'build/index.js',
format: 'esm'
}
}