Browse Source

Initial commit

Add files from pridepack.
master
TheoryOfNekomata 2 years ago
commit
2c98cf78ad
10 changed files with 3466 additions and 0 deletions
  1. +9
    -0
      .eslintrc
  2. +107
    -0
      .gitignore
  3. +7
    -0
      LICENSE
  4. +86
    -0
      package.json
  5. +3
    -0
      pridepack.json
  6. +143
    -0
      src/index.ts
  7. +22
    -0
      test/index.test.ts
  8. +21
    -0
      tsconfig.eslint.json
  9. +21
    -0
      tsconfig.json
  10. +3047
    -0
      yarn.lock

+ 9
- 0
.eslintrc View File

@@ -0,0 +1,9 @@
{
"root": true,
"extends": [
"lxsmnsyc/typescript"
],
"parserOptions": {
"project": "./tsconfig.eslint.json"
}
}

+ 107
- 0
.gitignore View File

@@ -0,0 +1,107 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.production
.env.development

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

.npmrc

+ 7
- 0
LICENSE View File

@@ -0,0 +1,7 @@
MIT License Copyright (c) 2022 TheoryOfNekomata <allan.crisostomo@outlook.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 86
- 0
package.json View File

@@ -0,0 +1,86 @@
{
"name": "@theoryofnekomata/oblique-strategies-core",
"version": "0.0.0",
"types": "dist/types/index.d.ts",
"main": "dist/cjs/production/index.js",
"module": "dist/esm/production/index.js",
"exports": {
".": {
"development": {
"require": "./dist/cjs/development/index.js",
"import": "./dist/esm/development/index.js"
},
"require": "./dist/cjs/production/index.js",
"import": "./dist/esm/production/index.js",
"types": "./dqist/types/index.d.ts"
},
"./dev": {
"production": {
"require": "./dist/cjs/production/index.js",
"import": "./dist/esm/production/index.js"
},
"require": "./dist/cjs/development/index.js",
"import": "./dist/esm/development/index.js",
"types": "./dist/types/index.d.ts"
},
"./esm": {
"development": "./dist/esm/development/index.js",
"production": "./dist/esm/production/index.js",
"default": "./dist/esm/production/index.js",
"types": "./dist/types/index.d.ts"
},
"./cjs": {
"development": "./dist/cjs/development/index.js",
"production": "./dist/cjs/production/index.js",
"default": "./dist/cjs/production/index.js",
"types": "./dist/types/index.d.ts"
}
},
"files": [
"dist",
"src"
],
"engines": {
"node": ">=10"
},
"license": "MIT",
"keywords": [
"pridepack"
],
"devDependencies": {
"@types/node": "^17.0.13",
"c8": "^7.11.0",
"eslint": "^8.8.0",
"eslint-config-lxsmnsyc": "^0.4.0",
"pridepack": "1.1.0",
"tslib": "^2.3.1",
"typescript": "^4.5.4",
"vitest": "^0.2.5"
},
"scripts": {
"prepublishOnly": "pridepack clean && pridepack build",
"build": "pridepack build",
"type-check": "pridepack check",
"lint": "pridepack lint",
"clean": "pridepack clean",
"watch": "pridepack watch",
"start": "pridepack start",
"dev": "pridepack dev",
"test": "vitest",
"test:coverage": "vitest run --coverage"
},
"private": false,
"description": "Be creative, pick constraints, get to work.",
"repository": {
"url": "https://code.modal.sh/modal-soft/oblique-strategies-core",
"type": "git"
},
"homepage": "https://code.modal.sh/modal-soft/oblique-strategies-core",
"bugs": {
"url": "https://code.modal.sh/modal-soft/oblique-strategies-core/issues"
},
"author": "TheoryOfNekomata <allan.crisostomo@outlook.com>",
"publishConfig": {
"access": "public"
}
}

+ 3
- 0
pridepack.json View File

@@ -0,0 +1,3 @@
{
"target": "es2017"
}

+ 143
- 0
src/index.ts View File

@@ -0,0 +1,143 @@
const DEFAULT_CARDS: string[] = [
'', //
'Abandon normal instruments', //
'Accept advice', //
'Accretion', //
'A line has two sides', //
'Allow an easement (an easement is the abandonment of a stricture)', //
'Always first steps', //
'Always give yourself credit for having more than personality', //
'Are there sections? Consider transitions', //
'Ask people to work against their better judgement', //
'Ask your body', //
'Assemble some of the instruments in a group and treat the group', //
'Balance the consistency principle with the inconsistency principle', //
'Be extravagant', //
'Be less critical more often', //
'Breathe more deeply', //
'Bridges\n-build\n-burn', //
'Cascades', //
'Change instrument roles', //
'Change nothing and continue with immaculate consistency', //
"Children's voices\n-speaking\n-singing", //
'Cluster analysis', //
'Consider different fading systems', //
'Consult other sources', //
'Convert a melodic element into a rhythmic element', //
'Courage!', //
'Cut a vital connection',
'Decorate, decorate', //
"Define an area as 'safe' and use it as an anchor", //
'Destroy\n-nothing\n-the most important thing', //
'Discard an axiom', //
'Disconnect from desire', //
'Disciplined self-indulgence', //
'Discover the recipes you are using and abandon them', //
'Distorting time', //
'Do nothing for as long as possible', //
"Don't be afraid of things because they're easy to do", //
"Don't be frightened of clichés", //
"Don't be frightened to display your talents", //
"Don't break the silence", //
"Don't stress one thing more than another", //
'Do something boring', //
'Do the washing up', //
'Do the words need changing?', //
'Do we need holes?', //
'Emphasize differences', //
'Emphasize repetitions', //
'Emphasize the flaws', //
'Faced with a choice, do both', //
'Feedback recordings into an acoustic situation', //
'Fill every beat with something', //
'From nothing to more than nothing', //
'Get your neck massaged', //
'Ghost echoes', //
'Give the game away', //
'Give way to your worst impulse', //
'Go outside. Shut the door.', //
'Go slowly all the way round the outside', //
'Go to an extreme, move back to a more comfortable place', //
'Honor thy error as a hidden intention', //
'How would you have done it?', //
'Humanize something free of error', //
'Idiot glee', //
'Imagine the music as a moving chain or caterpillar', //
'Imagine the music as a set of disconnected events', //
'Imagine the piece as a set of disconnected events', //
'Infinitesimal gradations', //
'Intentions\n-credibility of\n-nobility of\n-humility of', //
'Into the impossible', //
'Is it finished?', //
'Is there something missing?', //
'Is the tuning appropriate?', //
'It is quite possible (after all)', //
'Just carry on', //
'Left channel, right channel, centre channel',
'Listen in total darkness, or in a very large room, very quietly', //
'Listen to the quiet voice', //
'Look at a very small object, look at its centre', //
'Look at the order in which you do things', //
'Look closely at the most embarrassing details and amplify them', //
'Lowest common denominator check\n-single beat\n-single note\n-single riff', //
'Make a blank valuable by putting it in an exquisite frame', //
'Make an exhaustive list of everything you might do and do the last thing on the list', //
'Make a sudden, destructive unpredictable action; incorporate', //
'Mechanicalize something idiosyncratic', //
'Mute and continue', //
'Once the search is in progress, something will be found', //
'Only a part, not the whole', //
'Only one element of each kind', //
'(Organic) machinery', //
'Overtly resist change', //
'Not building a wall but making a brick', //
'Put in earplugs', //
'Question the heroic approach', //
'Remember those quiet evenings', //
'Remove ambiguities and convert to specifics', //
'Remove specifics and convert to ambiguities', //
'Repetition is a form of change', //
'Retrace your steps', //
'Revaluation (a warm feeling)', //
'Reverse', //
'Short circuit (example: a man eating peas with the idea that they will improve his virility shovels them straight into his lap)', //
'Shut the door and listen from outside', //
'Simple subtraction', //
'Simply a matter or work', //
'Spectrum analysis', //
'State the problem in words as clearly as possible', //
'Take a break', //
'Take away the elements in order of apparent non-importance', //
'Tape your mouth', //
'The inconsistency principle', //
'The most important thing is the thing most easily forgotten', //
'The tape is now the music', //
'Think of the radio', //
'Tidy up', //
'Towards the insignificant', //
'Trust in the you of now', //
'Turn it upside down', //
'Twist the spine', //
'Use an old idea', //
'Use an unacceptable color', //
'Use fewer notes', //
'Use filters', //
'Use unqualified people', //
'Water', //
'What are you really thinking about just now? Incorporate', //
'What is the reality of the situation?', //
'What mistakes did you make last time?', //
'What would your closest friend do?', //
"What wouldn't you do?", //
'Work at a different speed', //
'Would anybody want it?', //
'You are an engineer', //
'You can only make one dot at a time', //
"You don't have to be ashamed of using your own ideas", //
];

export const getDefaultCards = () => DEFAULT_CARDS;

export const generate = (cards = getDefaultCards()) => (
cards[Math.floor(Math.random() * cards.length)]
);

+ 22
- 0
test/index.test.ts View File

@@ -0,0 +1,22 @@
import { describe, it, expect } from 'vitest';
import { generate, getDefaultCards } from '../src';

describe('oblique-strategies-core', () => {
describe('generate', () => {
it('generates a card from the default', () => {
expect(generate()).toEqual(expect.any(String));
});

it('generates a card from the provided set of cards', () => {
expect(generate(['foo', 'bar'])).toEqual(expect.any(String));
});
});

describe('getDefaultCards', () => {
it('gets the set of default cards', () => {
expect(getDefaultCards()).toEqual(expect.arrayContaining([
expect.any(String),
]));
});
});
});

+ 21
- 0
tsconfig.eslint.json View File

@@ -0,0 +1,21 @@
{
"exclude": ["node_modules"],
"include": ["src", "types", "test"],
"compilerOptions": {
"module": "ESNext",
"lib": ["ESNext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"target": "ES2017"
}
}

+ 21
- 0
tsconfig.json View File

@@ -0,0 +1,21 @@
{
"exclude": ["node_modules"],
"include": ["src", "types"],
"compilerOptions": {
"module": "ESNext",
"lib": ["ESNext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,
"rootDir": "./src",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"jsx": "react",
"esModuleInterop": true,
"target": "ES2017"
}
}

+ 3047
- 0
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save