Skip to content

Remove v2 #1

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .github/actions/comment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'PR Comment'
description: 'Comment on the PR attached to a commit'
runs:
using: 'node12'
main: 'index.js'
26 changes: 26 additions & 0 deletions .github/actions/comment/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const core = require('@actions/core');
const github = require('@actions/github');

const octokit = new github.GitHub(process.env.GITHUB_TOKEN);
run();

async function run() {
try {
let {data: prs} = await octokit.repos.listPullRequestsAssociatedWithCommit({
...github.context.repo,
commit_sha: github.context.sha
});

if (!prs) {
return;
}

await octokit.issues.createComment({
...github.context.repo,
issue_number: prs[0].number,
body: `Build successful! [View the storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${github.context.sha}/index.html)`
});
} catch (error) {
core.setFailed(error.message);
}
}
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Use Node 12
uses: actions/setup-node@v1
with:
node_version: 12.x
- name: Write npmrc
env:
NPMRC: ${{ secrets.NPMRC }}
run: echo "$NPMRC" > .npmrc
- name: yarn install
run: |
make clean_node_modules
make install_no_postinstall
- name: build
run: |
make clean
make -B
- name: test
run: make ci-test
- name: build storybook
run: make storybook
- name: deploy storybook
env:
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }}
run: |
az storage blob upload-batch -d reactspectrum -s storybook-static --account-name reactspectrum
- name: comment on PR
uses: ./.github/actions/comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ dist
.package-lock.json
.cache

documentation/public
documentation/yarn.lock
dist
public
storybook-static


#allow
Expand Down
3 changes: 0 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
.editorconfig
.nycrc
.nyc_output
src
test
stories
coverage
Makefile
yarn.lock
Expand Down
27 changes: 13 additions & 14 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
@spectrum:registry=https://artifactory.corp.adobe.com:443/artifactory/api/npm/npm-spectrum-release/
//artifactory.corp.adobe.com:443/artifactory/api/npm/npm-spectrum-release/:always-auth=true

@react:registry=https://artifactory.corp.adobe.com:443/artifactory/api/npm/npm-react-release/
//artifactory.corp.adobe.com:443/artifactory/api/npm/npm-react-release/:always-auth=false

@a4u:registry=https://artifactory.corp.adobe.com:443/artifactory/api/npm/npm-a4u-release/
//artifactory.corp.adobe.com:443/artifactory/api/npm/npm-a4u-release/:always-auth=false

@kadira:registry=https://registry.npmjs.org/
//registry.npmjs.org/:always-auth=false

@types:registry=https://registry.npmjs.org/
//registry.npmjs.org/:always-auth=false
registry=https://registry.npmjs.com/
always-auth=false

@react:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-react-release/
//artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-react-release/:always-auth=true

@a4u:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-aria:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-spectrum:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-stately:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@react-types:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
@spectrum-icons:registry=https://artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/
//artifactory-uw2.adobeitc.com/artifactory/api/npm/npm-rsp-tmp-release/:always-auth=true

package-lock=false
6 changes: 0 additions & 6 deletions .storybook-v2/addons.js

This file was deleted.

46 changes: 0 additions & 46 deletions .storybook-v2/config.js

This file was deleted.

63 changes: 0 additions & 63 deletions .storybook-v2/layout.js

This file was deleted.

20 changes: 0 additions & 20 deletions .storybook-v2/theme.js

This file was deleted.

81 changes: 0 additions & 81 deletions .storybook-v2/webpack.config.js

This file was deleted.

10 changes: 1 addition & 9 deletions .storybook-v3/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ const generateScopedName = (localName, resourcePath) => {
};

module.exports = ({config}, env) => {
// Hack to get icons loading in the storybook without copying them over, these need to stay in for as long as we are using V2 components
// in the v3 storybook. only use right now is the Provider selection menus in the top right for scale, theme, etc
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/Icon\/(core\/)?([^\/\.]+)$/, function (resource) {
resource.request = '@react/react-spectrum-icons/dist/' + (/core/.test(resource.request) ? 'core/' : '') + path.basename(resource.request);
}));
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/\.\/js\/Icon/, path.resolve(__dirname + '/../src/Icon/js/Icon.js')));
config.plugins.push(new webpack.NormalModuleReplacementPlugin(/\.\/focus-ring-polyfill/, '@adobe/focus-ring-polyfill'));

if (env === 'PRODUCTION') {
// see https://github.com/storybooks/storybook/issues/1570
config.plugins = config.plugins.filter(plugin => plugin.constructor.name !== 'UglifyJsPlugin')
Expand Down Expand Up @@ -69,7 +61,7 @@ module.exports = ({config}, env) => {
set: {
'include css': true
},
use: [require('svg-stylus')(), require('nib')()]
use: [require('svg-stylus')()]
}
}
],
Expand Down
Loading