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

nadesiko3

v3.6.20

Published

Japanese Programming Language

Downloads

6,158

Readme

日本語プログラミング言語「なでしこ3」

MIT License npm version

「なでしこ3」とは

「なでしこ3」とは、日本語のプログラミング言語です。JavaScript/TypeScriptをベースとしているので、PC/スマホ/タブレットなど、幅広い環境で動きます。日本語プログラミング言語は、読みやすく理解しやすいのが特徴で、初めてでも楽しくプログラミングを覚えることができます。また、バッチ処理や定型処理などを手軽に記述できます。

はじめて「なでしこ」に挑戦する方は、次のチュートリアルから始めることをオススメします。日本語プログラミング言語の雰囲気が容易に理解できます。

対応機器/ブラウザ

なでしこ3は、内部的にJavaScriptに変換されて実行されます。そのため、JavaScriptが動作するさまざまな端末で実行できます。

  1. Webブラウザ(wnako) - 主要ブラウザ(Chrome/Safari/Edge/Firefox)に対応し、PC/スマートフォンで動作
  2. コマンドライン(cnako) - JavaScriptの実行エンジン「Node.js」上で動作
  3. 配付パッケージ - Electronを利用してローカルPC上で動作

具体的な対応ブラウザについて詳しくは、対応機器/ブラウザ をご覧ください。

ブラウザで利用する方法

次のWebエディタ上で、なでしこを実行できます。ブラウザがあれば動作します。

なでしこ3をインストールする方法

なでしこ3をインストールして動かす方法は下記にまとめています。

Node.jsでなでしこ3コマンドライン版をインストール

先にNode.js/npmをインストールします。 次いで、コマンドラインから次のコマンドを実行します。

npm install -g nadesiko3

すると、cnako3というコマンドで、なでしこを利用できます。

# コマンドラインからプログラムを実行
cnako3 -e "「こんにちは」と表示。"
# ソースコード hello.nako3 を実行
cnako3 hello.nako3

Node.jsの推奨バージョンは、v18 以上です。

GitHubからインストール

Gitコマンドをインストールした上で、次のコマンドを実行すると、なでしこの開発環境をセットアップできます。

git clone https://github.com/kujirahand/nadesiko3.git
cd nadesiko3
npm install
npm run build

Ubuntuへの開発環境のセットアップ

まっさらなUbuntu22.04に、なでしこ3の開発環境を整える場合は次のコマンドを実行します。

sudo apt update
# nvm で Node.js をインストール
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
source ~/.bashrc
nvm install v18.12.1
# リポジトリのセットアップ
git clone https://github.com/kujirahand/nadesiko3.git
cd nadesiko3
npm install
# なでしこ3のビルド
npm run build

追加インストール(macOS/Linux)

必要に応じて次のコマンドをインストールします。

macOS:

# 『圧縮』『解凍』命令のために
brew install p7zip

Ubuntu/Debian:

# 『圧縮』『解凍』命令のために
sudo apt install p7zip-full
# 『キー送信』命令のために
sudo apt install xdotool

全てのコマンドが正しく動くかを確認するには、次のコマンドを実行します。

npm test

コマンドライン版なでしこをインストールして使えるコマンド

ローカルPCになでしこをインストールしたら、次のコマンドを実行して、ブラウザで動作するエディタを起動できます。

# なでしこエディタ(WEB盤)のサーバーを起動
npm start
# なでしこエディタ(PC版)を起動
npm run nako3edit

Colabでなでしこを使って作業をする場合

以下にColabを使ってなでしこを使う場合の作業用テンプレートを用意しました。 ノートを複製して自分の作業に利用できます。

Colabでビルドテスト

Google Colabでなでしこのビルドテストできます。

なでしこの開発履歴

「なでしこ3」の開発は2017年に始まり、以後コツコツとバージョンアップを続けています。 「誰でも簡単プログラマー」の目標を実現するために、これからも頑張ります。

  • (2024/07/22) v.3.6.11でcoreに分割した開発用リポジトリを再び本家に統合
  • (2024/07/04) v3.6.8で、バンドルツールをwebpackからesbuildに変更(#1690)
  • (2022-05-19) v3.3.18でJavaScriptからTypeScriptへ変更。言語コアを別リポジトリcoreに移動
  • (2022-04-20) v3.3.2を公開(モジュール構造をCommonJS→ESModuleへ変更/asyncFnの実装)
  • (2021-04-09) v3.2.1を公開
  • (2020-04-24) v3.1.2を公開
  • (2017-12-29) v3.0.19を公開(無名関数の「には」構文の実装など)
  • (2017-06-25) 内部構造を大幅に修正(PEGパーサーから独自のパーサーに変更)
  • (2017-02-13)「なでしこ3」のプロジェクトが開始
  • (2004-08-01)「ひまわり2」としてゼロから「なでしこ」の開発が開始
  • (2001-08-03)「なでしこ」の前身「ひまわり」の開発を開始

なでしこ3の開発に参加

なでしこ3自身を開発するために、開発環境を整えようという方は、 doc/SETUP.md をご覧ください。 なでしこユーザーと開発者用のためのDiscordがあります。

なでしこ3プラグインの開発について

なでしこ3を拡張するプラグインを作るには、以下のドキュメントを参考にしてください。

関連リポジトリへのリンク