Skip to content

Commit

Permalink
chore: rename packages dir to @interactjs to match scope
Browse files Browse the repository at this point in the history
Re: #769
  • Loading branch information
taye committed Nov 12, 2019
1 parent aada458 commit 950157a
Show file tree
Hide file tree
Showing 148 changed files with 138 additions and 69 deletions.
5 changes: 3 additions & 2 deletions .nycrc.json
Expand Up @@ -5,14 +5,15 @@
"functions": 58,
"lines": 64,
"include": [
"packages/**/*.ts"
"@interactjs/**/*.ts"
],
"exclude": [
"**/*.spec.ts",
"**/_*"
],
"extension": [
".ts"
".ts",
".tsx"
],
"reporter": [
"text",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,6 @@
import interact, { init as initInteract } from '../interact/index'
import * as modifiers from '../modifiers/index'
import { Modifier } from '../modifiers/base'
import * as modifiers from '../modifiers/index'
import '../types/index'
import extend from '../utils/extend'
import * as snappers from '../utils/snappers/index'
Expand Down Expand Up @@ -31,9 +31,3 @@ export function init (win: Window) {
}

export default interact
;(interact as any).default = interact // tslint:disable-line no-string-literal
;(interact as any).init = init // tslint:disable-line no-string-literal

if (typeof module === 'object' && !!module) {
module.exports = interact
}
17 changes: 17 additions & 0 deletions @interactjs/interactjs/package.json
@@ -0,0 +1,17 @@
{
"name": "@interactjs/interactjs",
"version": "1.7.0",
"repository": {
"type": "git",
"url": "https://github.com/taye/interact.js.git"
},
"license": "MIT",
"dependencies": {
"@interactjs/types": "1.7.0"
},
"devDependencies": {
"@interactjs/interact": "1.7.0",
"@interactjs/modifiers": "1.7.0",
"@interactjs/utils": "1.7.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/dropzones/index.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Highlight dropzones with interact.js</title>
<script src="../../packages/interactjs/dist/interact.js"></script>
<script src="../../interactjs/dist/interact.js"></script>
<script src="index.js"></script>
<link rel="stylesheet" href="index.css">
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/events/index.html
Expand Up @@ -9,7 +9,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="index.css">
<script type="text/javascript" src="../js/underscore-min.js"></script>
<script type="text/javascript" src="../../packages/interactjs/dist/interact.js"></script>
<script type="text/javascript" src="../../interactjs/dist/interact.js"></script>
<script type="text/javascript" src="index.js"></script>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/index.html
Expand Up @@ -88,7 +88,7 @@
}
</style>

<script src="../../packages/interactjs/dist/interact.js"></script>
<script src="../../interactjs/dist/interact.js"></script>
<script src="../js/modernizr.js"></script>
<script src="../js/jquery-2.1.0.min.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/html_svg/index.html
Expand Up @@ -5,7 +5,7 @@
<title>interact.js demo</title>
<meta name="description" content="A small demonstration of interact.js, a drag and drop, resize and multitouch gesture module for modern browsers (and IE9)" />
<meta name="author" content="Taye Adeyemi" />
<script type="text/javascript" src="../../packages/interactjs/dist/interact.js"></script>
<script type="text/javascript" src="../../interactjs/dist/interact.js"></script>
<script type="text/javascript" src="index.js"></script>
<link rel="stylesheet" href="index.css" type="text/css"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/iframes/middle.html
@@ -1,7 +1,7 @@
<meta charset="utf-8">
<link href="index.css" rel="stylesheet" type="text/css"/>

<script src="../../packages/interactjs/dist/interact.js"></script>
<script src="../../interactjs/dist/interact.js"></script>

<iframe src="bottom.html" style="border: solid 2px black"></iframe>

Expand Down
2 changes: 1 addition & 1 deletion examples/snap/index.html
Expand Up @@ -5,7 +5,7 @@
<title>interact.js drag snapping</title>
<meta name="description" content="A demonstration of interact.js drag snapping" />
<meta name="author" content="Taye Adeyemi" />
<script type="text/javascript" src="../../packages/interactjs/dist/interact.js"></script>
<script type="text/javascript" src="../../interactjs/dist/interact.js"></script>
<script type="text/javascript" src="index.js"></script>
<link rel="stylesheet" href="index.css" type="text/css"/>
</head>
Expand Down
2 changes: 1 addition & 1 deletion examples/star/star.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions interactjs/bower.json
@@ -0,0 +1,42 @@
{
"name": "interactjs",
"main": "index.js",
"description": "Drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)",
"homepage": "http://interactjs.io",
"authors": [
{
"name": "Taye Adeyemi",
"email": "dev@taye.me",
"url": "http://taye.me"
}
],
"keywords": [
"interact.js",
"draggable",
"droppable",
"drag",
"drop",
"drag and drop",
"resize",
"touch",
"multi-touch",
"gesture",
"snap",
"inertia",
"grid",
"autoscroll",
"SVG"
],
"moduleType": [
"amd",
"globals",
"node"
],
"license": "MIT",
"ignore": [
"/*",
"!src",
"!dist",
"!LICENSE"
]
}
9 changes: 9 additions & 0 deletions interactjs/index.ts
@@ -0,0 +1,9 @@
import interact, { init } from '../@interactjs/interactjs/index'
export * from '../@interactjs/interactjs/index'

if (typeof module === 'object' && !!module) {
module.exports = interact
}

(interact as any).default = interact // tslint:disable-line no-string-literal
;(interact as any).init = init // tslint:disable-line no-string-literal
10 changes: 1 addition & 9 deletions packages/interactjs/package.json → interactjs/package.json
Expand Up @@ -5,11 +5,7 @@
"type": "git",
"url": "https://github.com/taye/interact.js.git"
},
"main": "index.ts",
"jsdelivr": "dist/interact.min.js",
"jspm": {
"main": "index"
},
"description": "Drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)",
"homepage": "https://interactjs.io",
"authors": [
Expand Down Expand Up @@ -39,13 +35,9 @@
],
"license": "MIT",
"dependencies": {
"@interactjs/interactjs": "1.7.0",
"@interactjs/types": "1.7.0"
},
"devDependencies": {
"@interactjs/interact": "1.7.0",
"@interactjs/modifiers": "1.7.0",
"@interactjs/utils": "1.7.0"
},
"_dev": {
"entries": "./index.ts",
"standalone": "interact",
Expand Down
2 changes: 1 addition & 1 deletion jsdoc/jsdoc.conf.js
@@ -1,4 +1,4 @@
const packagesDir = `${__dirname}/../packages`
const packagesDir = `${__dirname}/../@interactjs`
const glob = require('glob')
const ignore = ['**/node_modules/**', '**/*.spec.ts', '**/*.d.ts', '**/dist/**']
const include = [...new Set([
Expand Down
3 changes: 2 additions & 1 deletion lerna.json
@@ -1,6 +1,7 @@
{
"version": "0.0.0",
"packages": [
"packages/*"
"@interactjs/*",
"./interactjs"
]
}
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"workspaces": [
".",
"./packages/*"
"./@interactjs/*",
"./interactjs"
],
"bin": {
"@build": "scripts/build.js",
Expand All @@ -18,8 +19,8 @@
},
"scripts": {
"bootstrap": "npx yarn install",
"start": "cd packages/interactjs; NODE_ENV=development ../../scripts/build.js --watch",
"build": "cd packages/interactjs; NODE_ENV=production ../../scripts/build.js --docs",
"start": "cd interactjs; NODE_ENV=development ../scripts/build.js --watch",
"build": "cd interactjs; NODE_ENV=production ../scripts/build.js --docs",
"esnext": "scripts/esnext.js",
"docs": "node jsdoc/index.js",
"clean": "scripts/clean.js",
Expand Down
6 changes: 3 additions & 3 deletions scripts/release.sh
Expand Up @@ -26,7 +26,7 @@ ensure_clean_index() {
echo_funcname

# make sure the repo is clean
git clean -fx packages/*/dist/*
git clean -fx **/dist/*
if ! git diff-index HEAD --stat --exit-code; then
echo
quit "working directory must be clean" $?
Expand Down Expand Up @@ -83,7 +83,7 @@ run_build() {
echo_funcname

# copy README
cp $ROOT/README.md packages/interactjs/ &&
cp $ROOT/README.md interactjs/ &&

# copy license file
npx lerna exec --no-private -- cp -v $ROOT/LICENSE . ||
Expand All @@ -94,7 +94,7 @@ run_build() {

# copy .npmignore to all packages
npx lerna exec --no-private -- "echo '# copied from [root]/.npmignore' > .npmignore
cat ../../.npmignore >> .npmignore" &&
cat $ROOT/.npmignore >> .npmignore" &&

## generate esnext .js modules
npm run esnext &&
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Expand Up @@ -27,7 +27,7 @@ EXEC_ARGS=${EXEC_ARGS:="--require $PKG_DIR/test/babel-register"}
NODE_ENV=test $TEST_RUNNER $TEST_RUNNER_ARGS \
$EXEC_COMMAND \
$EXEC_ARGS \
--require $PKG_DIR/packages/types/index.ts \
--require $PKG_DIR/@interactjs/types/index.ts \
$ENTRY_FILE $@ |
tap-spec

Expand Down
4 changes: 2 additions & 2 deletions scripts/utils.js
@@ -1,9 +1,9 @@
const { promisify } = require('util')
const glob = promisify(require('glob'))

const sourcesGlob = 'packages/**/*{.ts,.tsx}'
const sourcesGlob = '{,@}interactjs/**/*{.ts,.tsx}'
const sourcesIgnoreGlobs = ['**/node_modules/**', '**/*_*', '**/*.spec.ts', '**/*.d.ts', '**/dist/**']
const builtFilesGlob = '{**/dist/**,packages/**/*.js{,.map}}'
const builtFilesGlob = '{**/dist/**,@interactjs/**/*.js{,.map}}'
const builtFilesIgnoreGlobs = ['**/node_modules/**']

const getSources = ({ cwd = process.cwd() } = {}) => glob(
Expand Down
2 changes: 1 addition & 1 deletion scripts/version.js
Expand Up @@ -31,7 +31,7 @@ if (!module.parent) {

const versionTable = []

for (const file of ['package.json', ...glob.sync('packages/*/package.json')]) {
for (const file of ['package.json', ...glob.sync('{@interactjs/*,interactjs}/package.json')]) {
const pkg = require(path.resolve(file))

versionTable.push({ package: pkg.name, old: pkg.version, new: newVersion })
Expand Down
2 changes: 1 addition & 1 deletion test/all.ts
@@ -1,5 +1,5 @@
// tslint:disable no-var-requires
require('../packages/types/index')
require('../@interactjs/types/index')

const glob = require('glob')
const path = require('path')
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Expand Up @@ -20,8 +20,8 @@
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
"@interactjs/*": ["./packages/*"],
"interactjs": ["./packages/interactjs"],
"@interactjs/_dev/*": ["./@interactjs/_dev/*"],
"interactjs": ["./@interactjs/interactjs"],
},

"inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
Expand Down

0 comments on commit 950157a

Please sign in to comment.