From 7ab0433bb53b667eadf1edae2d778c12f3a6782e Mon Sep 17 00:00:00 2001 From: Cahllagerfeld <43843195+Cahllagerfeld@users.noreply.github.com> Date: Sat, 24 Sep 2022 13:32:04 +0000 Subject: [PATCH] fix: remove files --- .circleci/cleanDir.js | 31 ---------- .circleci/config.yml | 81 -------------------------- .circleci/createDirect.js | 40 ------------- .circleci/jest-integration.config.json | 9 --- .circleci/removeDirect.js | 21 ------- azure-pipelines.yml | 27 --------- 6 files changed, 209 deletions(-) delete mode 100644 .circleci/cleanDir.js delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/createDirect.js delete mode 100644 .circleci/jest-integration.config.json delete mode 100644 .circleci/removeDirect.js delete mode 100644 azure-pipelines.yml diff --git a/.circleci/cleanDir.js b/.circleci/cleanDir.js deleted file mode 100644 index e67d4a77..00000000 --- a/.circleci/cleanDir.js +++ /dev/null @@ -1,31 +0,0 @@ -const { readdirSync, statSync, rmdir, unlink, existsSync } = require('fs') -const path = require('path') - -const targetDir = process.argv.length > 2 ? process.argv[2] : null - -if (targetDir == null || !existsSync(targetDir)) { - throw Error('You must provider a valid path to clean.') -} - -const getChildren = (dir) => readdirSync(dir).map((name) => path.join(dir, name)) -const stat = (path) => ({ - path, - isDir: statSync(path).isDirectory(), -}) -const isEmpty = ({ path, isDir }) => { - const stats = statSync(path) - if (!isDir) { - return stats.size === 0 - } else { - const children = getChildren(path) - return children.length === 0 || children.map(stat).every(isEmpty) - } -} - -for (const { path, isDir } of getChildren(targetDir).map(stat).filter(isEmpty)) { - if (isDir) { - rmdir(path, (err) => (!!err ? console.log(err) : null)) - } else { - unlink(path, (err) => (!!err ? console.log(err) : null)) - } -} diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 41b3fd86..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# - -defaults: &defaults - docker: - # Choose the version of Node you want here - - image: circleci/node:14.17 - working_directory: ~/repo - -version: 2 -jobs: - setup: - <<: *defaults - steps: - - checkout - - restore_cache: - name: Restore node modules - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: Install dependencies - command: | - yarn install --frozen-lockfile - - save_cache: - name: Save node modules - paths: - - node_modules - key: v1-dependencies-{{ checksum "yarn.lock" }} - - tests: - <<: *defaults - steps: - - checkout - - restore_cache: - name: Restore node modules - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: - name: Install React Native CLI and Ignite CLI - command: | - sudo npm i -g ignite-cli react-native-cli - - run: - name: Run tests - command: yarn ci:test # this command will be added to/found in your package.json scripts - - publish: - <<: *defaults - steps: - - checkout - - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - restore_cache: - name: Restore node modules - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - # Run semantic-release after all the above is set. - - run: - name: Publish to NPM - command: yarn ci:publish # this will be added to your package.json scripts - -workflows: - version: 2 - test_and_release: - jobs: - - setup - - tests: - requires: - - setup - - publish: - requires: - - tests - filters: - branches: - only: master diff --git a/.circleci/createDirect.js b/.circleci/createDirect.js deleted file mode 100644 index d748cd89..00000000 --- a/.circleci/createDirect.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This script creates the files necessary to access Gluegun tools directly. - * - * For example: - * - * const { print } = require('gluegun/print') - * - * It drops the files into the root directory just prior to releasing a new - * version of Gluegun. - * - * They are .gitignore'd by version control and quickly cleaned up after release. - */ - -const directFiles = [ - 'filesystem', - 'strings', - 'print', - 'system', - 'semver', - 'http', - 'patching', - 'prompt', - 'package-manager', -] - -const fs = require('fs') - -// add all the direct access files -directFiles.forEach((f) => { - const filename = __dirname + '/../' + f + '.js' - fs.writeFileSync(filename, `module.exports = require('./build/${f}')\n`) -}) - -// add the toolbox.js file for backwards compatibility -fs.writeFileSync( - __dirname + '/../toolbox.js', - `// for backwards compatibility with beta-rc7 -module.exports = require('./build/index') -`, -) diff --git a/.circleci/jest-integration.config.json b/.circleci/jest-integration.config.json deleted file mode 100644 index 72a5b983..00000000 --- a/.circleci/jest-integration.config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "testEnvironment": "node", - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "testRegex": "(\\.|/)integration\\.ts$", - "moduleFileExtensions": ["ts", "js", "json", "node"], - "roots": ["/.."] -} diff --git a/.circleci/removeDirect.js b/.circleci/removeDirect.js deleted file mode 100644 index 73469a88..00000000 --- a/.circleci/removeDirect.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * This file cleans up the build artifacts generated by createDirect.js. - */ - -const directFiles = [ - 'filesystem', - 'strings', - 'print', - 'system', - 'semver', - 'http', - 'patching', - 'prompt', - 'package-manager', - 'toolbox', -] -const fs = require('fs') -directFiles.forEach((f) => { - const filename = __dirname + '/../' + f + '.js' - if (fs.existsSync(filename)) fs.unlinkSync(filename) -}) diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 46317f1a..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,27 +0,0 @@ -pool: - vmImage: 'windows-latest' - -steps: -- task: NodeTool@0 - inputs: - versionSpec: '14.x' - displayName: 'Install Node.js' - -- script: | - choco install yarn -y - displayName: 'install yarn' - -- script: | - yarn install - displayName: 'yarn install' - -- script: | - yarn ci:test - displayName: 'yarn ci:test' - -- task: ArchiveFiles@2 - inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)/build/' - includeRootFolder: false - -- task: PublishBuildArtifacts@1