npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@educandu/dev-tools

v14.1.0

Published

Development tools for educandu based systems

Downloads

97

Readme

dev-tools

codecov

Development tools for educandu based systems and ESLint configuration shared between educandu projects.

Prerequisites

  • node.js ^18.0.0
  • optional: globally installed gulp: npm i -g gulp-cli

The output of this repository is an npm package (@educandu/dev-tools).

Installation

$ yarn add @educandu/dev-tools --dev
$ yarn add eslint eslint-plugin-import eslint-plugin-react eslint-plugin-react-hooks vitest @vitest/coverage-v8 --dev

Usage of eslint configuration

Create a file .eslint-config.cjs containing:

module.exports = require('@educandu/dev-tools/eslint-config');

Extend this file in your local .eslintrc.js, for example:

module.exports = {
  extends: ['./.eslint-config.cjs'],
  overrides: [...]
};

Usage of development tools

Use the dev tools in code as follows:

import {
  buildTranslationsJson,
  cliArgs,
  createGithubRelease,
  createLabelInJiraIssues,
  createReleaseNotesFromCurrentTag,
  downloadJson,
  ensureIsValidSemverTag,
  esbuild,
  eslint,
  getEnvAsString,
  jest,
  less,
  LoadBalancedNodeProcessGroup,
  MaildevContainer,
  MinioContainer,
  MongoContainer,
  NodeProcess,
  runInteractiveMigrations,
  TunnelProxyContainer
} from '@educandu/dev-tools';

await buildTranslationsJson({
  pattern: './**/*.yml',
  outputFile: './translations.json'
});

const { currentTag, releaseNotes, jiraIssueKeys } = await createReleaseNotesFromCurrentTag({
  jiraBaseUrl: cliArgs.jiraBaseUrl,
  jiraProjectKeys: cliArgs.jiraProjectKeys.split(',')
});

await createGithubRelease({
  githubToken: cliArgs.githubToken,
  currentTag,
  releaseNotes,
  files: []
});

await createLabelInJiraIssues({
  jiraBaseUrl: cliArgs.jiraBaseUrl,
  jiraUser: cliArgs.jiraUser,
  jiraApiKey: cliArgs.jiraApiKey,
  jiraIssueKeys,
  label: currentTag
});

await downloadJson('https://mydomain/my.json', './target.json');

ensureIsValidSemverTag('1.0.0');

await esbuild.transpileDir({
  inputDir: 'src',
  outputDir: 'dist',
  ignore: '**/*.spec.js'
});

// Note: `context` is only defined if `incremental` is set to `true`!
const context = await esbuild.bundle({
  entryPoints: ['./src/main.js'],
  outdir: './dist/dist',
  minify: true,
  incremental: true,
  inject: ['./src/polyfills.js'],
  metaFilePath: './reports/meta.json'
});

await context.rebuild();
await context.dispose();

await eslint.lint(['src/**/*.js'], { failOnError: true });

await eslint.fix(['src/**/*.js']);

const domain = getEnvAsString('DOMAIN');

await jest.coverage();

await jest.changed();

await jest.watch();

await less.compile({
  inputFile: 'src/main.less',
  outputFile: 'dist/main.css',
  optimize: true
});

const nodeApp = new NodeProcess({
  script: 'src/index.js',
  env: {
    ...process.env,
    PORT: 3000
  }
});

await nodeApp.start();
await nodeApp.restart();
await nodeApp.waitForExit();

const lbNodeApp = new LoadBalancedNodeProcessGroup({
  script: 'src/index.js',
  jsx: true,
  loadBalancerPort: 3000,
  getNodeProcessPort: index => 4000 + index,
  instanceCount: 3,
  getInstanceEnv: index => ({
    ...process.env,
    PORT: (4000 + index).toString()
  })
});

await lbNodeApp.start();
await lbNodeApp.restart();
await lbNodeApp.waitForExit();

const mongoContainer = new MongoContainer({
  port: 27017,
  rootUser: 'root',
  rootPassword: 'pw',
  replicaSetName: 'rsname'
});

await mongoContainer.ensureIsRunning();
await mongoContainer.ensureIsRemoved();

const minioContainer = new MinioContainer({
  port: 9000,
  accessKey: '435ZJV9F243DZ400KD',
  secretKey: '4837VZNC27NTZ24KTZU0X2ZTZ01TX',
  initialBuckets: ['my-bucket']
});

await minioContainer.ensureIsRunning();
await minioContainer.ensureIsRemoved();

const maildevContainer = new MaildevContainer({
  smtpPort: 8025,
  frontendPort: 8000
});

await maildevContainer.ensureIsRunning();
await maildevContainer.ensureIsRemoved();

const tunnelProxyContainer = new TunnelProxyContainer({
  name: 'tunnel',
  tunnelToken: ''0z543mh897h3j4rtxh,
  tunnelDomain: 'https://tunnel.com',
  localPort: 3000
});

await tunnelProxyContainer.ensureIsRunning();
await tunnelProxyContainer.ensureIsRemoved();

await runInteractiveMigrations({
  migrationsDirectory: 'migrations',
  migrationFileNamePattern: /^\d{4}-\d{2}-\d{2}-.*(?<!\.spec)(?<!\.specs)(?<!\.test)\.js$/
});

OER learning platform for music

Funded by 'Stiftung Innovation in der Hochschullehre'

A Project of the 'Hochschule für Musik und Theater München' (University for Music and Performing Arts)

Project owner: Hochschule für Musik und Theater München
Project management: Ulrich Kaiser