Skip to content

Commit

Permalink
Created versioned plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon committed Apr 23, 2021
1 parent d495632 commit bf9b1e2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions packages/expo-dev-launcher/plugin/build/withDevLauncher.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/expo-dev-launcher/plugin/build/withDevLauncher.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions packages/expo-dev-launcher/plugin/src/withDevLauncher.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import {
ConfigPlugin,
createRunOncePlugin,
ExportedConfigWithProps,
WarningAggregator,
withDangerousMod,
withMainActivity,
WarningAggregator,
ExportedConfigWithProps,
} from '@expo/config-plugins';
import { ExpoConfig } from '@expo/config-types';
import fs from 'fs';
import path from 'path';

import { withDevLauncherAppDelegate } from './withDevLauncherAppDelegate';

const pkg = require('expo-dev-launcher/package.json');

const DEV_LAUNCHER_ANDROID_IMPORT = 'expo.modules.devlauncher.DevLauncherController';
const DEV_LAUNCHER_ON_NEW_INTENT = `
@Override
Expand Down Expand Up @@ -183,4 +186,4 @@ const withDevLauncher = (config: ExpoConfig) => {
return config;
};

export default withDevLauncher;
export default createRunOncePlugin(withDevLauncher, pkg.name, pkg.version);
6 changes: 3 additions & 3 deletions packages/expo-dev-menu/plugin/build/withDevMenu.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/expo-dev-menu/plugin/build/withDevMenu.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/expo-dev-menu/plugin/src/withDevMenu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ConfigPlugin,
createRunOncePlugin,
ExportedConfigWithProps,
WarningAggregator,
withDangerousMod,
Expand All @@ -11,6 +12,8 @@ import path from 'path';

import { withDevMenuAppDelegate } from './withDevMenuAppDelegate';

const pkg = require('expo-dev-menu/package.json');

const DEV_MENU_ANDROID_IMPORT = 'expo.modules.devmenu.react.DevMenuAwareReactActivity';
const DEV_MENU_ACTIVITY_CLASS = 'public class MainActivity extends DevMenuAwareReactActivity {';

Expand Down Expand Up @@ -114,4 +117,4 @@ const withDevMenu = (config: ExpoConfig) => {
return config;
};

export default withDevMenu;
export default createRunOncePlugin(withDevMenu, pkg.name, pkg.version);

0 comments on commit bf9b1e2

Please sign in to comment.